With the reference to moving data files from z/OS to an ASCII platform
and intending to read that archived data, for any "binary" file, that
is, a file that can contain non-pure-text data, the PGM=FTP on z/OS will
delete ALL of the BDWs and RDWs from any dataset with RECFM=V or VB or VBS,
and you end up with a serial file of bytes of binary data, on your PC,
with no way to know where a record started or ended.
You must use specialized JCL around your PGM=FTP to preserve the
BDWs and RDWs Example i., below), or use PGM=IEBGENER to create a
block-for-block copy of the z/OS file, but with RECFM=U (Example iv. below),
since RECFM=U prevents PGM=FTP from mucking about with the BDWs and RDWs).
i. ftp instructions for sending data to the MXG ftp site
Using the IBM ftp program, you can ftp any MVS data file to the
MXG ftp site with this syntax; do NOT change the DCB attributes
of the //SMFFILE DD: even though it points to a VBS DSNAME, the
RECFM=U,BLKSIZE=32760 must be used to include BDW and RDWs.
//FTP EXEC PGM=FTP,PARM='(EXIT=4'
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*
//SMFFILE DD DSN=YOUR.SMF.DATA,DCB=RECFM=U,BLKSIZE=32760,DISP=SHR
//INPUT DD *
ftp.mxg.com
userid password
quote PASV
bin
put //DD:SMFFILE yourname.smf
close
quit
/*
IMPORTANT: userid/password may be mixed case
do NOT change the DCB attributes of the //SMFFILE DD.
This ftp can be used for MVS files with RECFM=U,F,FB,V,VB, or VBS,
but for F/FB files, please email us the LRECL value of each file.
The SYSPRINT output will tell you if the ftp transfer succeeded
or not; in a production environment, you probably want a Return
Code set if there was any error; the syntax for the IBM ftp
program to set Return Code 12 on any error is
//FTP EXEC PGM=FTP,PARM='FTP.MXG.COM (EXIT=12'
iv. If you simply try to ftp a V/VB/VBS file, it will be unreadable
because when PGM=FTP sees those RECFMs, it shows how smart it is
and sends only the data, stripping the BDW and RDW. The previous
PGM=FTP with its special references solves that problem.
But an alternative is to create a RECFM=U copy of the V/VB/VBS
file, and then that copy can be ftp'd and the BDW/RDW will be
preserved.
// EXEC PGM=IEBGENER
//SYSUT1 DD DSN=YOUR.VB.FILE,DISP=SHR,RECFM=U,BLKSIZE=32760
//SYSUT2 DD DSN=YOUR.NEW.RECFMU,DISP=(,CATLG),RECFM=U,
// BLKSIZE=32760,UNIT=SYSDA,SPACE=(CYL,(50,50))
//SYSIN DD DUMMY
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html