FTP a dataset from MVS to Linux
I am trying to FTP a dataset (in binary mode) from MVS to Linux which has RECFM=VB and LRECL=32756 and BLKSIZE=327560. I know, in MVS dataset there must be some bytes for BDW/RDW which tells the size of the record in dataset. After FTP when I read the dataset, the BDW/RDW bytes are removed from the dataset and now, it becomes difficult to read the dataset. Please suggest some ways, by which I can read these BDW/RDW bytes in Linux.
First, the BLKSIZE can't be 327560 (is this a typo)? The maximum is 32K (32760) for DASD and even on tape using the "new" Large BLKSIZE Interface (LBI) support the maximum is 256K (for 3590). I'll assume you meant 32760.
It might be easiest to convert the file to FB with LRECL=32756 prior to the FTP. A simple REXX program could be used. For example:
/* REXX */
"ALLOC FI(VBIN) DA('my.file.VB') SHR REUSE"
"ALLOC FI(FBOUT) DA('my.file.FB') SHR REUSE"
"EXECIO * DISKR VBIN (FINIS"
"EXECIO * DISKW FBOUT (FINIS"
If you run this in batch you can allocate the files in JCL and don't need the ALLOC / FREE in the program.
This was first published in March 2007