ebcidic file coversion to ascii


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ebcidic file coversion to ascii
# 1  
Old 03-22-2004
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
# 2  
Old 03-22-2004
Look at the dd command. It has an option to do that conversion.
# 3  
Old 03-22-2004
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...
# 4  
Old 03-23-2004
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.
# 5  
Old 03-23-2004
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 Smilie

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)
# 6  
Old 03-23-2004
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.
# 7  
Old 03-24-2004
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Convert Hex to Ascii in a Ascii file

Hi All, I have an ascii file in which few columns are having hex values which i need to convert into ascii. Kindly suggest me what command can be used in unix shell scripting? Thanks in Advance (2 Replies)
Discussion started by: HemaV
2 Replies

2. UNIX for Dummies Questions & Answers

After Ftp'ing file to destination how to check the file if it is in correct ASCII and not corrupted

Hi Folks, While transferring file from FTP software like Filezilla the files gets corrupted. Is there any way I can check if the recently transferred file is in ASCII and not corrupted. I have tried using file -i filename command which does tell if the file character set is ASCII or binary... (6 Replies)
Discussion started by: Khan28
6 Replies

3. Shell Programming and Scripting

Ebcidic to ASCII (Packed decimals are there)

I have a input file which is EBCIDIC and it has packed decimals. Can anyone help me to convert EBCIDIC file to ASCII(Need to convert even Packed decimal values also to normal format) (12 Replies)
Discussion started by: Anusha_Reddy
12 Replies

4. UNIX for Dummies Questions & Answers

applying unix command in EBCIDIC file

Hi, I'm having a general query. If we do cat <file name> on a Ebcidic format file then many unknown characters are displayed in my screen. Can we change the character set related to EBCIDIC in session level and apply the cat command on a EBCIDIC file? By doing so can we able to see the... (2 Replies)
Discussion started by: poova
2 Replies

5. Shell Programming and Scripting

convert ascii values into ascii characters

Hi gurus, I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies

6. Shell Programming and Scripting

Date format Coversion.

Hello guys, I want to convert my date from '2009 02 28' to '28/FEB/2009'. Any suggestions would greatly be appreciated. Thanks, Sud (3 Replies)
Discussion started by: sud
3 Replies

7. Shell Programming and Scripting

Date format Coversion.

Guys, 1.I need to convert a date from YYYY M D to YYYYMMDD. - 2009 2 6 to 20090206 2.When the month or day are inbetween 1-9 I need to add a 0 infront of month or day so that the output would be YYYYMMDD. Thanks, Sud. (2 Replies)
Discussion started by: sud
2 Replies

8. UNIX for Dummies Questions & Answers

Viewing Ebcidic files

I am having trouble viewing these files from my unix session. vi comes back with line too long. Also an m_dump with the relevant dml comes back with problems. How can I view this as a text file? Also is there an easy way to view specific records within. Eg I have a policy id (4 Replies)
Discussion started by: trek88
4 Replies

9. Shell Programming and Scripting

conversion of EBCIDIC to ASCII format

Hi all, I need help on above said subject. I have a flat file which is in EBCDIC format,i want to convert into ASCII fromat using 'MFSORT'. file contains COMP-3 value in some positions. Can you please provide the SCRIPT SYNTAX.(assume that file is of 80 byte length and it is having COMP-3... (2 Replies)
Discussion started by: vijayakumarg
2 Replies

10. Shell Programming and Scripting

EBCIDIC to ASCII

can anyone get a script for converting EBCIDIC data to Unix ina file.. in shell... thanks in advance! (3 Replies)
Discussion started by: bourne
3 Replies
Login or Register to Ask a Question