Compare using Syncsort/ICETOOL



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Compare using Syncsort/ICETOOL

Postby shirazi2589 » Mon May 21, 2012 1:21 pm

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??
shirazi2589
 
Posts: 15
Joined: Mon Nov 14, 2011 9:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Compare

Postby BillyBoyo » Mon May 21, 2012 1:37 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post