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)
*****************************************************************************************************