Comparing files using syncsort and Cobol
Posted: Thu Mar 21, 2013 9:59 pm
I have a little experience with jcl/mainframe/cobol but not a lot. I am suppose to do a syncsort of a file then compare (to find NONmatches I believe) using cobol. This is what I have so far for my sync sort.
Now from what I understand is that I have to write a cobol program that takes the sorted "fileb" and compare it with another file that I have not received yet so it is not shown in the code above. I'll call it filec. Then whenever there is a file that doesn't match it outputs it into another file. I am generally having a hard time just with the syntax of how to do this. And understanding if I can write the cobol underneath the syncsort in another step. As you can tell I am pretty new to this lol. Any help will be appreciated
000004 //STEP02 EXEC PGM=SYNCSORT
000005 //SYSOUT DD SYSOUT=*
000006 //SYSPRINT DD SYSOUT=*
000007 //EZTVFM DD UNIT=SYSDA,SPACE=(TRK,(9999,999),RLSE)
000008 //SORTIN DD DSN=filea,DISP=SHR
000009 //SORTOUT DD DSN=Tfileb,
000010 // DISP=SHR
000011 //* DISP=(,CATLG,DELETE),
000012 //* LRECL=25,RECFM=FB,BLKSIZE=25000,
000013 //* SPACE=(27998,(7000,700),RLSE),UNIT=HSMDA
000014 //SYSIN DD *
000015 SORT FIELDS=(1,5,ZD,A)
000016 /*
000017 //*
000005 //SYSOUT DD SYSOUT=*
000006 //SYSPRINT DD SYSOUT=*
000007 //EZTVFM DD UNIT=SYSDA,SPACE=(TRK,(9999,999),RLSE)
000008 //SORTIN DD DSN=filea,DISP=SHR
000009 //SORTOUT DD DSN=Tfileb,
000010 // DISP=SHR
000011 //* DISP=(,CATLG,DELETE),
000012 //* LRECL=25,RECFM=FB,BLKSIZE=25000,
000013 //* SPACE=(27998,(7000,700),RLSE),UNIT=HSMDA
000014 //SYSIN DD *
000015 SORT FIELDS=(1,5,ZD,A)
000016 /*
000017 //*
Now from what I understand is that I have to write a cobol program that takes the sorted "fileb" and compare it with another file that I have not received yet so it is not shown in the code above. I'll call it filec. Then whenever there is a file that doesn't match it outputs it into another file. I am generally having a hard time just with the syntax of how to do this. And understanding if I can write the cobol underneath the syncsort in another step. As you can tell I am pretty new to this lol. Any help will be appreciated