I am trying to copy a VB dataset to another defined with RECFM=U (because I would like to keep the RDW so they are not stripped in FTP transfers, but that's besides the point).
So I have my VB dataset displaying as such:
ATW 2019000029 0001
etc
etc
My VB has a record length of 3048 and a block size of 6233.
I am using IEBGENER to make the copy:
//STEP005 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=WORK.JOHN
//SYSUT2 DD DSN=WORK.JOHN.RESULT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DCB=(RECFM=U,LRECL=32756)
//SYSIN DD DUMMY
//
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=WORK.JOHN
//SYSUT2 DD DSN=WORK.JOHN.RESULT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DCB=(RECFM=U,LRECL=32756)
//SYSIN DD DUMMY
//
I am using deliberately a LRECL of 32756 because as I understood, U datasets should simply be raw binary data, with BDW and RDW as the start of each line and block. So the idea is to maximise the length on which the data is copied in raw format.
But the resulting dataset is very strange:
.. V...U.bATW.c2019:.0a29.:.0h1etc
We can see the first bytes which seem to be BDW and RDW but the rest seems different; the 0s between 2019 and 29 in the number above are replaced by strange characters, and the same seemed to happen for the spaces. Also, the record length seems to have been kept at 3044 on display.
Is there anything wrong with the way I did?
My idea was to have a VB file such as:
ABC 123
ABC 456789
ABC 456789
Copied to a U file as:
....ABC 123....ABC 456789
Thank you for your help,