Operating System - HP-UX
1829104 Members
5088 Online
109986 Solutions
New Discussion

using dd to convert from UNIX to mainframe

 
SOLVED
Go to solution
George Doller
Frequent Advisor

using dd to convert from UNIX to mainframe

I am trying to use dd to cut a tape for the IRS to be used on an IBM system . I am using the following on an HPUX 10.20 system:
dd if=xxx of=/dev/rmt/c9t0d0D6250 bs=6900 conv=block cbs=276 conv=ebcdic

They are telling me that the block size is 6900 and record length is 275. I don't understand. They said to use 6900 with 276 or 6875 with 275. I thought I was using 6900 with 276. Any thoughts or ideas????
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: using dd to convert from UNIX to mainframe

Hi George,

It's been years since I've had to do one of these. I seem to remember that they want 25 records/block (25x276=6900).

I would do this in two steps or you can build a pipeline.

dd if=xxx of=/tmp/f1 bs=276 cbs=276 conv=ebcdic
then
dd if=/tmp/f1 ibs=276 obs=6900 of=/dev/rmt/c9t0d0D6250.

Regards, Clay

If it ain't broke, I can fix that.
Chris Calabrese
Valued Contributor

Re: using dd to convert from UNIX to mainframe

The block size is a function of the bs argument to dd.

But the record length has nothing to do with dd. It has to do with the length of records in your input file.

Your input file probably has lines that look like this
field-1|f2|f3|...\n
whereas they're looking for something with fixed length fields and hence records.
Brainbench MVP for Unix Administration and Internet Security, SANS Review Editor, and Center for Internet Security HP-UX Benchmark project leader