cksum byte count different from OMVS and UNIX
Posted: Sat Dec 20, 2008 5:49 am
I've been tasked with writing a JCL proc that creates a PS dataset containing the POSIX cksum of a passed dataset or member. Currently the proc is working fine. It ibgens the dataset over to OMVS, and then I use BPXBATCH to run cksum on the file. Now, when the same dataset is downloaded from the mainframe to a UNIX server via binary download the byte count (and obviously the CRC hash) are different. At this point I'm not sure how to pinpoint where the failure is. It could be the IEBGENER is monkeying around and not doing a faithful copy, or it could be that the FTP binary download is doing something (though to my understanding it shouldn't). To recap, I have a PS dataset that is copied to OMVS where a cksum is performed. Then, the cksum is put into a PS dataset, and then both the cksum dataset and the original PS dataset are FTP'd (client initiated). The number of bytes cksum reports on OMVS is different from the number of bytes reported on the UNIX server.
I would be inclined to think that the problem is with the FTP as I have tested IEBGENER by copying the data to OMVS, then copying that data into a new PS dataset, and then copying it back, and comparing the cksums each time, and they were identical. I would think is IEBGENER changed anything, it would do it both times. So I'm not sure what to try at this point. Any help would be appreciated.
Output from OMVS cksum: 568045815.25549481./tmp/input.ADW832
Output from UNIX cksum: 635370730.25544160.input.ADW832
Here is the JCL in the proc
I would be inclined to think that the problem is with the FTP as I have tested IEBGENER by copying the data to OMVS, then copying that data into a new PS dataset, and then copying it back, and comparing the cksums each time, and they were identical. I would think is IEBGENER changed anything, it would do it both times. So I'm not sure what to try at this point. Any help would be appreciated.
Output from OMVS cksum: 568045815.25549481./tmp/input.ADW832
Output from UNIX cksum: 635370730.25544160.input.ADW832
Here is the JCL in the proc
//CKSUM PROC DSOUT='*',DSIN='*',JNAME=''
//*******************************************************
//* Inputs : DSOUT,DSIN,JNAME *
//* &DSOUT : The dataset to send the cksums to *
//* &DSIN : The Dataset you are getting a cksum of *
//* &JNAME : The Name of the job invoking the proc *
//*******************************************************
//*******************************************************
//* Delete DSOUT File if it exists *
//*******************************************************
//STEP1 EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//LOOKHERE DD DSN=&DSOUT,
// DISP=(MOD,DELETE,DELETE),SPACE=(TRK,(1,1))
//*******************************************************
//* Copy From DSIN to chksum_input.JNAME *
//*******************************************************
//IEBGENER EXEC PGM=IEBGENER,REGION=5M,TIME=100
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=&DSIN,
// DISP=(OLD,KEEP,KEEP)
//SYSUT2 DD PATH='/tmp/chksum_input.&JNAME',
// PATHOPTS=(OWRONLY,OCREAT),PATHDISP=(KEEP,DELETE),
// PATHMODE=(SIWUSR,SIXUSR,SIRUSR)
//*******************************************************
//* Run BPXBATCH To cksum passed file *
//*******************************************************
//BPXBATCH EXEC PGM=BPXBATCH,
// PARM='SH cksum /tmp/chksum_input.&JNAME'
//STDOUT DD PATH='/tmp/cksmout.&JNAME',PATHOPTS=(OWRONLY,OCREAT),
// PATHDISP=(KEEP,DELETE),PATHMODE=(SIWUSR,SIXUSR,SIRUSR)
//*******************************************************
//* COPY FROM cksmout.&JNAME to DSOUT *
//*******************************************************
//IEBGENER EXEC PGM=IEBGENER,REGION=5M,TIME=100
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD PATH='/tmp/cksmout.&JNAME',PATHOPTS=(ORDONLY),
// PATHDISP=(DELETE,DELETE),FILEDATA=TEXT,LRECL=4096,RECFM=U,
// BLKSIZE=4096
//SYSUT2 DD DSN=&DSOUT,DISP=(NEW,CATLG),
// DCB=(DSORG=PS,RECFM=U,LRECL=80),
// SPACE=(TRK,(1,1))
//*******************************************************
//* Run BPXBATCH to delete all .&JNAME files *
//*******************************************************
//BPXBATCH EXEC PGM=BPXBATCH,
// PARM='SH find /tmp/ -name "*.&JNAME" | xargs rm -f'
//STDOUT DD PATH='/tmp/std.out',PATHOPTS=(OWRONLY,OCREAT),
// PATHDISP=(DELETE,DELETE),PATHMODE=(SIWUSR,SIXUSR,SIRUSR)
//*******************************************************
//* Inputs : DSOUT,DSIN,JNAME *
//* &DSOUT : The dataset to send the cksums to *
//* &DSIN : The Dataset you are getting a cksum of *
//* &JNAME : The Name of the job invoking the proc *
//*******************************************************
//*******************************************************
//* Delete DSOUT File if it exists *
//*******************************************************
//STEP1 EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//LOOKHERE DD DSN=&DSOUT,
// DISP=(MOD,DELETE,DELETE),SPACE=(TRK,(1,1))
//*******************************************************
//* Copy From DSIN to chksum_input.JNAME *
//*******************************************************
//IEBGENER EXEC PGM=IEBGENER,REGION=5M,TIME=100
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=&DSIN,
// DISP=(OLD,KEEP,KEEP)
//SYSUT2 DD PATH='/tmp/chksum_input.&JNAME',
// PATHOPTS=(OWRONLY,OCREAT),PATHDISP=(KEEP,DELETE),
// PATHMODE=(SIWUSR,SIXUSR,SIRUSR)
//*******************************************************
//* Run BPXBATCH To cksum passed file *
//*******************************************************
//BPXBATCH EXEC PGM=BPXBATCH,
// PARM='SH cksum /tmp/chksum_input.&JNAME'
//STDOUT DD PATH='/tmp/cksmout.&JNAME',PATHOPTS=(OWRONLY,OCREAT),
// PATHDISP=(KEEP,DELETE),PATHMODE=(SIWUSR,SIXUSR,SIRUSR)
//*******************************************************
//* COPY FROM cksmout.&JNAME to DSOUT *
//*******************************************************
//IEBGENER EXEC PGM=IEBGENER,REGION=5M,TIME=100
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD PATH='/tmp/cksmout.&JNAME',PATHOPTS=(ORDONLY),
// PATHDISP=(DELETE,DELETE),FILEDATA=TEXT,LRECL=4096,RECFM=U,
// BLKSIZE=4096
//SYSUT2 DD DSN=&DSOUT,DISP=(NEW,CATLG),
// DCB=(DSORG=PS,RECFM=U,LRECL=80),
// SPACE=(TRK,(1,1))
//*******************************************************
//* Run BPXBATCH to delete all .&JNAME files *
//*******************************************************
//BPXBATCH EXEC PGM=BPXBATCH,
// PARM='SH find /tmp/ -name "*.&JNAME" | xargs rm -f'
//STDOUT DD PATH='/tmp/std.out',PATHOPTS=(OWRONLY,OCREAT),
// PATHDISP=(DELETE,DELETE),PATHMODE=(SIWUSR,SIXUSR,SIRUSR)