ebcidic file coversion to ascii

I want to convert an ebcidic( variable length) file to ascii.

Is it possible to do it using a unix scripting.if so, how

Look at the dd command. It has an option to do that conversion.

Now, for giggles and grins:

I happened to run across a similar questions today. We're getting ready to test some software that will run on an HP NonStop in the OSS personality (Open System Services has a user-interface very much like Unix - in fact some of the header files included reference OSF/1 and Compaq Unix code).

Interestingly enough - HP didn't put "dd" in, even though it has the man page on the system!

Is there any way to get some of the functions that dd provides (one of them being ascii-->ebcidic translation) via other utilities?

Also, we don't have a C compiler on the system. If we wrote custom code, it'd have to be in COBOL, TAL, or pTAL. Not being a coder, I'm not going to learn one of those languages just for a little convinience...

Livin' Free:

Are you sure about your missing dd? Maybe it was not installed correctly or your path is not right? It has always been available on any HP system I have worked on.

I'm positive. In the NonStop Knowledge Base, there's even a case in there for it. It's been in a state of "Under Development Review" for some time, and I think they just don't want another wacky Unix tool to support :stuck_out_tongue:

Seriously though, this isn't even "truly" Unix, if there was such a thing in the first place. It's a semi-POSIX-compatible environment. There's no Unix kernel, only /dev/tty and /dev/null as devices, and no freakin dd! (Although we have tr on the system, I wonder how long that would take to translate a huge datafile...)

For more information on the NonStop, see here:
http://h71033.www7.hp.com

(Note: NonStop used to be Compaq Himalaya, and before that was known as Tandem Computers)

OK Livin' Free I get it now.

HP has created a specific OS to handle the fault tolerant aspects of the NonStop system.

While you are on the subject what other commands are you missing?

tr or awk might be able to handle the conversions, at a pinch ed or sed?

Personally I would not feel comfortable on a Unix (?) system that does not have some kind of compiled language. Unless you can produce binarys on another, standard HP-UX system and port (not likely since the architecture seems different) I would suggest you get a compiler installed.

HP do state in the documentation that it will support Java. Maybe writing a little java goodie on another platform and porting over to your system might work?

Sorry can't be much more help.

No problem - it was worth a shot.

I wish we had a compiler too - people have started to port GNU programs over to the system. Luckily, some are in binary form as well (such as my bash shell). But, I'm not going to pay for it myself, plus maintenance...

I do have most other "standard" utilities, such as awk, sed, vi, etc, etc, etc... I was thinking about "tr", but man - that would take forever on a huge file. Even the normal programs like lp act similarly, even though they're mostly a compatibility layer (in that example, lp just translates, and forwards the print job to the Guardian native print spooler.)

We do have the Java package installed - but it's terribly slow on that system (even more than normal, it seems!)

Maybe we could keep bugging support for it - maybe they'll start listening...

Thanks again.

Hi everyone
I havent used python before and in my organization i the standard scripting is python.

I just started learning python and since i am running out of time to meet the deadlines i would appreciate if anyone could give me an equivalent python script for the unix script below.

This is one checks for the lines containing '7898-9865-9888-0000' and outputs that to another file

1)grep "[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]" inputfile.txt > outputfile.txt

This one is a simple conversion of ebcidic file to ascii with a record lenght of 152.
2)dd if=/Files/incoming.txt cbs=152 conv=ascii of=/Files/incoming/file.ascii