I'm trying to compare 2 text files, line by line, using Syncsort JOINKEYS with SEQNUM.
//SORT EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DISP=SHR,DSN=TEMP.JOINTEST.F1.FB80
//JNF1CNTL DD *
RECORD TYPE=FB,LENGTH=89
INREC FIELDS=(SEQNUM,8,ZD,C' ',1,80)
//SORTJNF2 DD DISP=SHR,DSN=TEMP.JOINTEST.F2.FB80
//JNF2CNTL DD *
INREC FIELDS=(SEQNUM,8,ZD,C' ',1,80)
//SORTOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,89,A),SORTED
JOINKEYS FILES=F2,FIELDS=(1,89,A),SORTED
JOIN UNPAIRED,ONLY
REFORMAT FIELDS=(F1:1,89,F2:1,89),FILL=C' '
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,
IFTHEN=(WHEN=(1,1,CH,NE,C' '),BUILD=(C'F1-',01,89)),
IFTHEN=(WHEN=(1,1,CH,EQ,C' '),BUILD=(C'F2-',90,89))
//
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DISP=SHR,DSN=TEMP.JOINTEST.F1.FB80
//JNF1CNTL DD *
RECORD TYPE=FB,LENGTH=89
INREC FIELDS=(SEQNUM,8,ZD,C' ',1,80)
//SORTJNF2 DD DISP=SHR,DSN=TEMP.JOINTEST.F2.FB80
//JNF2CNTL DD *
INREC FIELDS=(SEQNUM,8,ZD,C' ',1,80)
//SORTOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,89,A),SORTED
JOINKEYS FILES=F2,FIELDS=(1,89,A),SORTED
JOIN UNPAIRED,ONLY
REFORMAT FIELDS=(F1:1,89,F2:1,89),FILL=C' '
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,
IFTHEN=(WHEN=(1,1,CH,NE,C' '),BUILD=(C'F1-',01,89)),
IFTHEN=(WHEN=(1,1,CH,EQ,C' '),BUILD=(C'F2-',90,89))
//
Problem is, Syncsort does not seem to accept the JNF1/2 LRECL change due to the JNFxCNTL INREC statements.
SYNCSORT FOR Z/OS 1.4.0.1N
...
WER486A ERROR IN JNF1 PROCESSING
WER482I JNF1 STATISTICS
WER483B 6,920K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 1,020K BYTES USED
WER108I SORTJNF1 : RECFM=FB ; LRECL= 80; BLKSIZE= 27920
WER073I SORTJNF1 : DSNAME=TEMP.JOINTEST.F1.FB80
WER027A CONTROL FIELD BEYOND RECORD
...
WER486A ERROR IN JNF1 PROCESSING
WER482I JNF1 STATISTICS
WER483B 6,920K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 1,020K BYTES USED
WER108I SORTJNF1 : RECFM=FB ; LRECL= 80; BLKSIZE= 27920
WER073I SORTJNF1 : DSNAME=TEMP.JOINTEST.F1.FB80
WER027A CONTROL FIELD BEYOND RECORD
So, how do I convince Syncsort the input records are 89 bytes?
Best Regards,
Yifat