Page 2 of 2

Re: cksum byte count different from OMVS and UNIX

PostPosted: Thu May 03, 2012 10:58 am
by AnandAK
Hi,
Can anyone please help me out here?

Re: cksum byte count different from OMVS and UNIX

PostPosted: Thu May 03, 2012 9:28 pm
by bbonner
This is a blast from the past. I looked at your JCL and it looks essentially like what I have in place. When you FTP the file down to your other system are you making sure you have the transmission method set to binary? If you set the transmission to binary it should have the same cksum when computed, and can then be converted to ASCII or whatever format you want. That is what I remember setting up on the receiving systems ends, was a script that computed the cksum output and then converted the file.

Re: cksum byte count different from OMVS and UNIX

PostPosted: Fri May 04, 2012 12:42 am
by dick scherrer
Hello,

FWIW - it has been many years since i or any client site have had "corruption" after a successful transmission. This includes thousands of PCs, hundreds of Unix and Windows servers, and many dozen mainframes. If the transmission fails, all bets are off. . .

I don't recall the last time i saw someone actually try to work with the checksum. Possibly it is not needed in this case.

Re: cksum byte count different from OMVS and UNIX

PostPosted: Fri May 04, 2012 1:13 am
by bbonner
I would second what Dick said. The only reason the site I worked at wanted that comparison was for one particularly critical data transfer where the damage done by processing incorrect data was quite hard to fix. Unless there is some high cost from having the data be mangled I would say it is a very small concern.

Re: cksum byte count different from OMVS and UNIX

PostPosted: Fri May 04, 2012 12:24 pm
by AnandAK
Thank you very much for your reply bbonner and Dick Scherrer. Here we have this requirement to fullfil one of our compliance requirements. Eventhough data corruption doesnt happen nowadays while file transfer, they wanted a proof for that :).

I have tried changing the file from EBCDIC to ASCII using iconv and it worked now. Please find the JCL below :

************************************************************************************************
//CKSUM011 JOB (XXXX,XXX,00000),'XXXXXXXX ',REGION=0K,
// MSGCLASS=X,
// CLASS=D,
// NOTIFY=&SYSUID
//*******************************************************
//* DELETE OUTPUT FILE IF IT EXISTS *
//*******************************************************
//STEP1 EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//LOOKHERE DD DSN=CHKSUM.OUT,
// DISP=(MOD,DELETE,DELETE),SPACE=(TRK,(1,1))
//*******************************************************
//* COPY FROM input TO file named i *
//*******************************************************
//IEBGENER EXEC PGM=IEBGENER,REGION=5M,TIME=100
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=CHKSUM.INFILE,
// DISP=(OLD,KEEP,KEEP)
//SYSUT2 DD PATH='/tmp/i1',
// PATHOPTS=(OWRONLY,OCREAT),PATHDISP=(KEEP,DELETE),
// PATHMODE=(SIWUSR,SIXUSR,SIRUSR),
// FILEDATA=TEXT,LRECL=27994,RECFM=VB,BLKSIZE=27998
//*******************************************************
//* COPY FROM ebcdic to ascii *
//*******************************************************
//BPXBATCH EXEC PGM=BPXBATCH,
// PARM='SH iconv -f IBM-1047 -t ISO8859-1 /tmp/i1 > /tmp/i'
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*******************************************************
//* RUN BPXBATCH TO CKSUM PASSED FILE *
//*******************************************************
//BPXBATCH EXEC PGM=BPXBATCH,
// PARM='SH cksum /tmp/i'
//STDOUT DD PATH='/tmp/cksmout.i',PATHOPTS=(OWRONLY,OCREAT),
// PATHDISP=(KEEP,DELETE),PATHMODE=(SIWUSR,SIXUSR,SIRUSR),
// FILEDATA=TEXT,LRECL=27994,RECFM=VB,BLKSIZE=27998
//*******************************************************
//* COPY FROM CKSMOUT.i TO output file *
//*******************************************************
//IEBGENER EXEC PGM=IEBGENER,REGION=5M,TIME=100
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD PATH='/tmp/cksmout.i',PATHOPTS=(ORDONLY),
// PATHDISP=(DELETE,DELETE),
// FILEDATA=TEXT,LRECL=27994,RECFM=VB,BLKSIZE=27998
//SYSUT2 DD DSN=CHKSUM.OUT,DISP=(NEW,CATLG),
// DCB=(DSORG=PS,RECFM=U,LRECL=80),
// SPACE=(TRK,(1,1))
//*******************************************************
//* RUN BPXBATCH TO DELETE ALL .i FILES *
//*******************************************************
//BPXBATCH EXEC PGM=BPXBATCH,
// PARM='SH find /tmp/ -name "i" | xargs rm -f'
//STDOUT DD PATH='/tmp/std.out',PATHOPTS=(OWRONLY,OCREAT),
// PATHDISP=(DELETE,DELETE),PATHMODE=(SIWUSR,SIXUSR,SIRUSR)
//*******************************************************
//* RUN BPXBATCH TO DELETE ALL .i FILES *
//*******************************************************
//BPXBATCH EXEC PGM=BPXBATCH,
// PARM='SH find /tmp/ -name "*.i" | xargs rm -f'
//STDOUT DD PATH='/tmp/std.out',PATHOPTS=(OWRONLY,OCREAT),
// PATHDISP=(DELETE,DELETE),PATHMODE=(SIWUSR,SIXUSR,SIRUSR)
//*******************************************************
//* RUN BPXBATCH TO DELETE ALL .i1 FILES *
//*******************************************************
//BPXBATCH EXEC PGM=BPXBATCH,
// PARM='SH find /tmp/ -name "i1" | xargs rm -f'
//STDOUT DD PATH='/tmp/std.out',PATHOPTS=(OWRONLY,OCREAT),
// PATHDISP=(DELETE,DELETE),PATHMODE=(SIWUSR,SIXUSR,SIRUSR)
*****************************************************************************************************

Re: cksum byte count different from OMVS and UNIX

PostPosted: Fri May 04, 2012 12:31 pm
by AnandAK
Hello bbonner,
to answer your questions, the upstream system transfers the file in Ascii mode, not binary. So I will ask them to send using Binary mode and test this once again. We are actually in the process of developing the data feeds set up . Here for testing purpose we had run the cksum command in unix , in future we will develop a script.

Thanks a lot for your reply.