dd EBCDIC to ASCII Conversion Problem

dd EBCDIC to ASCII Conversion Problem

Post by Lucky Leavel » Thu, 02 May 2002 03:54:13

OS: AIX4.3.3 ML09

I am trying to read a tape [3490] created on an IBM OS/VS 370 in EBCDIC
using block size 7735 and record length 595.  When I use the following dd

        dd if=/dev/rmt2 of=ascii.data conv=ascii ibs=7735 cbs=595

everything works fine until it encounters nulls (0x00) in the data
stream. When these occur, they are always at position 390 for a lngth of
20.  When the nulls are encountered, dd skips the remainder of the current
record and concatenates the following record, beginning in position 390
for a total of 990 bytes.

If I first read the data from tape to disk without the conversion:

        dd if=/dev/rmt2 of=data.ebcdic ibs=7735

and then convert using a second dd command:

        dd if=data.ebcdic of=data.ascii conv=ascii cbs=595

it works fine, handling the nulls as other data.

Has anyone observed this [peculiar] behavior and do you have a better way
of handling it?

Thank you,

Lucky Leavell                  


1. Using dd to convert ASCII to EBCDIC and output the converted format to multiple tapes


   I need to come up with a shell script that does the following:

1) convert ASCII to EBCDIC format
2) output the converted format to be able to span across multiple
tapes with logical labelling for the tapes (eg. i can label the tape
as A1,subsequent will be A2,A3 ....)

I am able to convert the data from ASCII to EBCDIC using the dd
command but i can't think of any methods to write the data to tape. If
i was to use tar, then the tape format will be in tar format and not

Any suggestions or methods worth trying is greatly appreciated. Thanks
in advance.


2. where can i find the source for ps?

3. incompatibility in dd EBCDIC conversions?

4. xawtv or kwintv howto?

5. help with dd command - EBCDIC to ASCII

6. lpd won't accept print jobs from other machines

7. EBCDIC/ASCII Conversion

8. Linux and hp jetdirect driven laserprinter.

9. SOS: C Routines for ASCII to EBCDIC Conversion and Vice-versa

10. EBCDIC to ASCII conversion program

11. EBCDIC/ASCII Conversion With RPC To IBM Mainframe

12. EBCDIC & ASCII Conversion Routines Needed

13. EBCDIC to ASCII Conversion