To explain what we are doing here is -
in Step1, we are converting a 648-byte file to a 1000-byte file sorted on 2 fields (as given in the sort card) excluding the Header (H) and Trailer (T). Then in Step2, we are trying to find out the records, which are present in the current generation of OUTFILE, but not present in the previous generation of the OUTFILE.
My question is, can we simplify Step2 by removing those DUMMY DSN in OUT12 and OUT1 & include the Sort logic in Step1 in the ICETOOL control card itself? The OUT2 file has to be sorted per the Sort order as given in Step1.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
I believe you can simplify your two steps to one ICETOOL step like this (but I haven't actually tested it since I don't have your input data sets). I'm assuming you want to keep OUTFILE(+1) as a separate data set; if not, the job could be simplified even more.
Joined: 22 Apr 2005 Posts: 24 Location: New York, USA
Thanks Frank. It worked like a breeze! But I missed to mention one new requirement - the SORTOUT(+1) file has to be sorted in the following order as well:
(176,10,CH,A,258,10,CH,A)
Can I include that condition in the single step as well or do I need to add another step?
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Since you used ON(1,1000,CH) for SPLICE, it sorts the records that way.
If you need SORTOUT(+1) sorted on the other fields, then you'll have to do a separate sort for that after the SPLICE. The only way to avoid that would be if you can use ON(176,10,CH) ON(258,10,CH) for the SPLICE but that would compare on those fields instead of 1,1000,CH.