Currently in my JCL i have two SORT steps. In first sort step it sorts the input in certain sorting key fileds and write in output file. In the second sort it sorts the same input file and in the same sorting keys fields and SUM fileds and write in a different file. Is there any way in sort to club both steps in a single step to write FILE1 with just sorted order and second file with SORT SUMMED order? Basically since the input file contain millions pf records i just wanted to save some MIPS in clubbing together.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
SUM FIELDS=(27,9) is invalid since you don't have a format. What is the format of this field - ZD, PD, BI?
I believe you could do it in one pass by not using SUM, but instead using an OUTFIL without SECTIONS for the sorted version, and an OUTFIL with REMOVECC, NODETAIL, SECTIONS, TRAILER3 and TOT for the sorted/summed version. But I need to know the format of the field to be summed before I can show you how to do it.
Also, what is the RECFM and LRECL of the input file?
Are the SORT PD values all positive, or can they be both positive and negative?
The SUM FIELDS format is PD .
Also the RECFM is FB and LRECL is 80.
The SORT PD values is acct number and PID. So it is Positive.
But the summed fileds are expiration points. So it can be Positive Or Negative