Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
Optimising sortcard

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message

Active User

Joined: 20 Sep 2008
Posts: 106
Location: Bangalore

PostPosted: Thu May 24, 2018 6:25 pm    Post subject: Optimising sortcard
Reply with quote

Hi All,
Could someone please help us in optimizing one of the sortcard. The system is using syncsort version SYNCSORT FOR Z/OS 2.1.2.

About the sortcard:
This sortcard is using an input file and splitting it into 5 different files depending upon some include conditions. Currently it is processing around 300 million records in input and usually takes 18 minute of cpu tcb.

Could you please help us in providing some suggestion so that the CPU time can reduce.

The code looks like below:


  OPTION COPY                                                         
  OUTFIL FNAMES=SORT01,INCLUDE=((5,4,SS,EQ,C'0008,0013,0015,0017'),   
  OUTFIL FNAMES=SORT02,INCLUDE=((5,4,SS,EQ,C'0006,0009,0018,0029'),   
  OUTFIL FNAMES=SORT03,INCLUDE=((5,4,SS,EQ,C'0012,0025,0052,0084'),   
  OUTFIL FNAMES=SORT04,INCLUDE=((5,4,SS,EQ,C'0051'))                   
  OUTFIL FNAMES=SORT05,INCLUDE=((5,4,SS,NE,C'0008,0013,0015,0017'),   

Back to top
View user's profile Send private message


Active Member

Joined: 29 Apr 2008
Posts: 825
Location: Maryland

PostPosted: Fri May 25, 2018 5:18 am    Post subject:
Reply with quote

There is no time-consuming operation in this example which might seriously affect the total CPU time spent by SORT utility.

Only one minor improvement can be suggested: eliminate OR/AND operators, and use single "SS,EQ", or "SS,NE" for the whole list of valid/invalid selection values. But I'm in doubt if it might improve total performance by more than 1-2%; the major time-consuming operations are: read/write 300B records, and moving data between I/O buffers, and temporary memory storage.

Keep in mind the rule from SORT manual:
If the control statement does contain a literal string that would extend beyond column 71, place a continuation character in column 72 and begin the continuation of the literal string in column 16 of the next card image.
Back to top
View user's profile Send private message
Arun Raj


Joined: 17 Oct 2006
Posts: 2482
Location: @my desk

PostPosted: Fri May 25, 2018 11:12 pm    Post subject:
Reply with quote

The substring comparison format you have used above would compare the field against each possible 4 byte strings.

For example,
would look for

.....and so on. So you might be doing a lot more checks than that are actually required.

I dont have Syncsort and can't test this, but I would suggest you try modifying this into individual ORs instead of a substring SS search and see if that improves anything.

In order to simplify the multiple EQ/ORs, you can use the below format if your Syncsort version supports it.

Similarly multiple NE/ANDs can be simplified as
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1


Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Reformat clause in joinkeys sortcard ... Mounika Nemani DFSORT/ICETOOL 2 Thu May 31, 2018 5:35 pm
No new posts Sortcard to put comma after particula... sakrat DFSORT/ICETOOL 21 Mon May 11, 2015 8:20 pm
No new posts comparing file using sortcard with th... Annie Mary George DFSORT/ICETOOL 3 Fri Jan 24, 2014 10:58 pm
No new posts Need help for the sortcard using outr... shikhasharma JCL & VSAM 15 Mon May 28, 2012 10:41 am
No new posts Need Sortcard for filtering records u... G-Man JCL & VSAM 10 Tue Jul 21, 2009 11:13 am

Back to Top
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us