Page 1 of 1

Is there some order of processing SYSIN statements in SORT?

Posted: Fri Jul 19, 2013 12:18 pm
by Sachin Kumar
Hi,

Please have a look at below code:

Code: Select all

INREC FIELDS=(1,5,81:SEQNUM,3,ZD)
SORT FIELDS=(1,5,CH,A)           
SUM FIELDS=NONE                   
and then I used

Code: Select all

SORT FIELDS=(1,5,CH,A)           
INREC FIELDS=(1,5,81:SEQNUM,3,ZD)
SUM FIELDS=NONE                   
In both the cases I got the same output. With first code I though that it'll first process INREC and later SORT and opposite for the second code but it does not seem to work that way. Is there some specif way of execution of statements?

Re: Is there some order of processing SYSIN statements in SO

Posted: Fri Jul 19, 2013 4:53 pm
by Robert Sample
DFSORT (or Syncsort -- whichever you use) is a very sophisticated product. I suspect (but do not know for a fact) that it analyzes the SYSIN and ensures that INREC processing is performed before the sort and OUTREC processing after the sort -- no matter the order of those statements in the SYSIN. You could confirm this by contacting your sort vendor.

Re: Is there some order of processing SYSIN statements in SO

Posted: Wed Jul 24, 2013 1:33 pm
by Manoj
I think INREC is performed first...

Re: Is there some order of processing SYSIN statements in SO

Posted: Tue Aug 20, 2013 6:23 pm
by Anuj Dhawan
As has been indicated- For a SORT application, keeping the example you cited in mind - it does not matter which order you specify the control cards in the SYSIN.

INREC processing occurs before SORT processing, and then SUM occurs after the SORT.

If you've SyncSort manual, SyncSort for z/OS Programmer's Guide, please refer to Chapter 8 in this Guide for the complete Flow of the Sort.

Re: Is there some order of processing SYSIN statements in SO

Posted: Sun May 04, 2014 9:53 pm
by Sachin Kumar
Thanks guys.

Re: Is there some order of processing SYSIN statements in SO

Posted: Sun May 04, 2014 10:12 pm
by Anuj Dhawan
Glad, we had been helpful.