I've a requirement to compare two VB file (LRECL: 32576), excluding header and trailer records.
If all the records match in both the files excluding header and trailer, then I want to set the RC to 0, else to 4.
Note that header and trailer begin with Q200
I tried the option listed in the following link, ibmmainframes.com/about57721.html, but it is not comparing the records correctly. It is setting RC to 0 even though there are differences.
I tried the following: Even though the VB length is 32576, the maximum length of the record is 4000. So I used JOINKEYS, but the problem is that all the matching records are getting written to SORTOUT and so the return code is never set to 4.
I need to set the return code to 4 only when there is even one record mis-match. If all the records match, then I want the RC to be set to 0.
phani_nittice,
Instead of using JOIN UNPAIRED,F2 (Right outer Join) go with UNPAIRED,F1,F2,ONLY to get only unpaired records from both the input files and SET RC=4 if you get any records in the SORTOUT. Remove the NULLOUT and pass the below parm to set RC4 when you get any unpaired record.
Code:
STEP01 EXEC PGM=SORT,PARM='NOTMTOUT=RC4'
you included OMIT to remove Header, Trailer for File1 only. Add for F2 also.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
That is one of the two things I was suggesting, and it looks like the version you have installed does not support JNFnCNTL datasets. So try the other suggestion.