I have a requirement to compare two Variable length(VB) files(Yesterday's & Today's file). The max length of the file is 3372. Requirement is to compare the two files and generate two output files, one with matching records and the other file with non-matching records. The constraint is both the files have a date field which would be different from yesterday's file to today's file. So we need to omit the date field while comparing. Could anybody please suggest doing this in SYNCSORT.
SYNCSORT allows you to write to multiple output files. There are two different ways to do this. Both methods use the OUTFIL keyword, and are identical except in how you specify the DDNAME.
Method 1 allows you to specify the DDNAME to be written to.
In this example the sort file will be split into 2 files, CUST1 and CUST2, depending on whether the first character is A or B. CUST1 and CUST2 must be defined as DDNAMES in the JCL.
Method 2 uses DDNAMEs defined by DFSORT in the form SORTOFxx.
In this example the sort file is split into 2 files SORTOF1 and SORTOF2, depending on whether the first character is A or B. SORTOF1 and SORTOF2 must be defined as DDNAMEs in the JCL.
Note that the INCLUDE format differs from the normal format when using it with OUTFIL
as your saying its VB file u need to leave first 4 bytes and start from 5th byte it mean..if you want to sort 1 letter of the file u r sort condition start at (5,1....)
if you want to sort 5 to 10 letters of the file u r sort condition start at (9,10....)
If you have SyncSort for z/OS 1.2, then the JOIN feature would most likely be the best solution. Please provide sample input so that we can better help you with this application.
I have just given the first 30 characters from the files. First character is spaces in both files. The key starts from 2nd position and it is 24 bytes in length(2,24).
My requirement is to create 2 output files:
OUT1 : Should have records matching the key.The file should contain entire record and it has to be taken from File2.The result should be
OUT2: Should have records which are there in File 2 and NOT there in File1. Again file should contain entire record and it has to be taken from File2.The result should be
The Date field can be skipped by not mentioning in the Join Keys files as above, assuming the date field is in 101 - 110.
The reformat fields will give you, what your output file must look like.
Here is a one-step JOIN application that should produce your desired output. As previously mentioned, this application requires SyncSort for z/OS 1.2.0 or later.