Hello,
I have to create a report in which i need to join two file and put the match record in the output also the unmatched record of the first file must be in output file.I am using the sort but it is not working as per the expectation.First file has the record length 400 and second file has the record length 450.
job and card.
//STEP21 EXEC PGM=SORT
//SORTJNF1 DD DSN=first input file ,DISP=SHR
//SORTJNF2 DD DSN=second input file,DISP=SHR
//SORTOF02 DD DSN=ARCHIVES.YR2009.OUTPUT.UN,DISP=SHR
//SORTOF01 DD DSN=ARCHIVES.YR2009.OUTPUT1,DISP=SHR
//SYSOUT DD SYSOUT=*
//SORTMSG DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(109,9,A)
JOINKEYS FILE=F2,FIELDS=(2,9,A)
REFORMAT FIELDS=(F1:1,400,F2:1,450),FILL=X'FF'
JOIN UNPAIRED
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOF01,INCLUDE=(401,1,BI,EQ,X'FF'),OUTREC=(1,400)
OUTFIL FNAMES=SORTOF02,INCLUDE=(1,1,BI,NE,X'FF',AND,97,1,CH,NE,X'FF'),
OUTREC=(1,97,415,30,400:X)
My requirement is that the record count of the first file is equal to record count of output file (match and unmatched records). Could you please help me out of this problem.
Thanks
Bodhi.