Is there some order of processing SYSIN statements in SORT?

SyncSort's Sort Product, SyncTool for z/OS, SYNCINIT and SYNCLIST.
Post Reply
Sachin Kumar
Registered Member
Posts: 24
Joined: Wed Jul 17, 2013 9:08 am

Is there some order of processing SYSIN statements in SORT?

Post 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?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
Manoj
Registered Member
Posts: 33
Joined: Wed Jul 17, 2013 9:10 am

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

Post by Manoj »

I think INREC is performed first...
User avatar
Anuj Dhawan
Founder
Posts: 2816
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

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

Post 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.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Sachin Kumar
Registered Member
Posts: 24
Joined: Wed Jul 17, 2013 9:08 am

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

Post by Sachin Kumar »

Thanks guys.
User avatar
Anuj Dhawan
Founder
Posts: 2816
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

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

Post by Anuj Dhawan »

Glad, we had been helpful.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SyncSort, SyncTool, SyncGener.”