Page 1 of 1

Compare using Syncsort/ICETOOL

PostPosted: Mon May 21, 2012 1:21 pm
by shirazi2589
We have 3 input files.
First File Contains employee id(length = 11) from position 1-11 along with other fields.
2nd file Contains employee id(length = 11) from position 1-11, status field (having only 2 values either 'Start' or Stop') starting at position 47 to 51,along with various other fields.
3rd file also contains employee id(length = 11) from position 1-11, and driver-status-field(having only 2 values either 'Active' or 'Inactive') starting at position 1055 to 1063,along with various other fields.

We have to retrieve employee id from file 1, check the same in file 2 and file 3.
From File 2 retrieve the status(either 'Start' or 'Stop') and check for the driver-status-field in file 3.

If status is 'Start' and the driver-status = 'Active' ------include the record from file 1 to an output file
If status is 'Start' and the driver-status = 'inactive' ------omit the record.
If status is 'Stop and the driver-status = 'Active' ------omit the record.
If status is 'Stop' and the driver-status = 'inactive' ------include the record from file 1 to an output file

Can this be done using Syncsort/ICETOOL??

Re: Compare

PostPosted: Mon May 21, 2012 1:37 pm
by BillyBoyo
Yes. Two steps, both joinkeys.

Step 1, compare File 1 to File 2, outputting Start/Stop

Step 2, compare Start/Stop to File 3, outputting final

Lots of example of JOINKEYS, yours are simple ones (on what you have said).

If you get stuck, post your sort cards, sysout from the problem, and sample input data/expected output, LRECL/RECFM of files.