I don't really need the 3 output files.
However, I do need a file that contains the PN numbers from OPVL that do not exist in the PASM file.
Yes, It is possible to have a match in all three datasets.
Here is the JCL I used.
//S1 EXEC PGM=ICETOOL
//PASM DD DSN=PFS.FS99U.DBSEQ.AFN5.PASM.EXTRACT(+0),DISP=SHR
//OPPH DD DSN=PFS.FS99U.DBSEQ.AFN5.OPPH.EXTRACT(+0),DISP=SHR
//OPVL DD DSN=PFS.FS99U.DBSEQ.AFN5.OPVL.EXTRACT,DISP=SHR
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//PASMOUT DD DSN=ACVE023.SEQ.AFN5.PASMOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(300,20),RLSE),
// DCB=(RECFM=FB,LRECL=300,BLKSIZE=0)
//OPVLOUT DD DSN=ACVE023.SEQ.AFN5.OPVLOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(300,20),RLSE),
// DCB=(RECFM=FB,LRECL=202,BLKSIZE=0)
//OPPHOUT DD DSN=ACVE023.SEQ.AFN5.OPPHOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(300,20),RLSE),
// DCB=(RECFM=FB,LRECL=306,BLKSIZE=0)
//TOOLIN DD *
COPY FROM(PASM) TO(PASMOUT) USING(CTL1)
SORT FROM(OPVL) USING(CTL2)
SORT FROM(OPPH) USING(CTL3)
/*
//CTL1CNTL DD *
INREC BUILD=(1:1,11,82:82,10,92:92,16)
/*
//CTL2CNTL DD *
INCLUDE COND=(187,2,CH,EQ,C'PN')
INREC BUILD=(101:101,16,146:146,10,187:187,16)
SORT FIELDS=(187,16,CH,A)
OUTFIL FNAMES=OPVLOUT,NODETAIL,REMOVECC,
SECTIONS=(187,16,
TRAILER3=(101:TOT=(101,16,SFF,EDIT=(SIIIIIIIIIIIT.TT),
SIGNS=(+,-)),146:146,10,187:187,16))
/*
//CTL3CNTL DD *
INCLUDE COND=(131,11,CH,NE,C' ')
INREC BUILD=(131:131,11,291:291,16)
SORT FIELDS=(131,11,CH,A)
OUTFIL FNAMES=OPPHOUT,NODETAIL,REMOVECC,
SECTIONS=(131,11,
TRAILER3=(131:131,11,
291:TOT=(291,16,SFF,EDIT=(SIIIIIIIIIIIT.TT),
SIGNS=(+,-))))
/*
//
//PASM DD DSN=PFS.FS99U.DBSEQ.AFN5.PASM.EXTRACT(+0),DISP=SHR
//OPPH DD DSN=PFS.FS99U.DBSEQ.AFN5.OPPH.EXTRACT(+0),DISP=SHR
//OPVL DD DSN=PFS.FS99U.DBSEQ.AFN5.OPVL.EXTRACT,DISP=SHR
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//PASMOUT DD DSN=ACVE023.SEQ.AFN5.PASMOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(300,20),RLSE),
// DCB=(RECFM=FB,LRECL=300,BLKSIZE=0)
//OPVLOUT DD DSN=ACVE023.SEQ.AFN5.OPVLOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(300,20),RLSE),
// DCB=(RECFM=FB,LRECL=202,BLKSIZE=0)
//OPPHOUT DD DSN=ACVE023.SEQ.AFN5.OPPHOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(300,20),RLSE),
// DCB=(RECFM=FB,LRECL=306,BLKSIZE=0)
//TOOLIN DD *
COPY FROM(PASM) TO(PASMOUT) USING(CTL1)
SORT FROM(OPVL) USING(CTL2)
SORT FROM(OPPH) USING(CTL3)
/*
//CTL1CNTL DD *
INREC BUILD=(1:1,11,82:82,10,92:92,16)
/*
//CTL2CNTL DD *
INCLUDE COND=(187,2,CH,EQ,C'PN')
INREC BUILD=(101:101,16,146:146,10,187:187,16)
SORT FIELDS=(187,16,CH,A)
OUTFIL FNAMES=OPVLOUT,NODETAIL,REMOVECC,
SECTIONS=(187,16,
TRAILER3=(101:TOT=(101,16,SFF,EDIT=(SIIIIIIIIIIIT.TT),
SIGNS=(+,-)),146:146,10,187:187,16))
/*
//CTL3CNTL DD *
INCLUDE COND=(131,11,CH,NE,C' ')
INREC BUILD=(131:131,11,291:291,16)
SORT FIELDS=(131,11,CH,A)
OUTFIL FNAMES=OPPHOUT,NODETAIL,REMOVECC,
SECTIONS=(131,11,
TRAILER3=(131:131,11,
291:TOT=(291,16,SFF,EDIT=(SIIIIIIIIIIIT.TT),
SIGNS=(+,-))))
/*
//
What does "SFF" do when you total the amounts?
Thanks.