Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums 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
Niki

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:

Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
  OPTION COPY                                                         
  OUTFIL FNAMES=SORT01,INCLUDE=((5,4,SS,EQ,C'0008,0013,0015,0017'),   
                OR,(5,4,SS,EQ,C'0025,0026,0027,0030,0032,0054,0055'), 
                OR,(5,4,SS,EQ,C'0089,0091,0092,0097'))                 
  OUTFIL FNAMES=SORT02,INCLUDE=((5,4,SS,EQ,C'0006,0009,0018,0029'),   
                OR,(5,4,SS,EQ,C'0033,0043,0046,0050,0061,0064,0080'), 
                OR,(5,4,SS,EQ,C'0085'))                               
  OUTFIL FNAMES=SORT03,INCLUDE=((5,4,SS,EQ,C'0012,0025,0052,0084'),   
                OR,(5,4,SS,EQ,C'0093'))                               
  OUTFIL FNAMES=SORT04,INCLUDE=((5,4,SS,EQ,C'0051'))                   
  OUTFIL FNAMES=SORT05,INCLUDE=((5,4,SS,NE,C'0008,0013,0015,0017'),   
                AND,(5,4,SS,NE,C'0025,0026,0027,0029,0030,0032,0054'),
                AND,(5,4,SS,NE,C'0055,0058,0059,0075,0081,0082,0086'),
                AND,(5,4,SS,NE,C'0043,0093'),                         
                AND,(5,4,SS,NE,C'0051'))                               

Back to top
View user's profile Send private message

sergeyken

Active User


Joined: 29 Apr 2008
Posts: 388
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:
Quote:
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

Moderator


Joined: 17 Oct 2006
Posts: 2448
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,
Code:
5,4,SS,EQ,C'0008,0013,0015,0017'
would look for
Code:
0008
008,
08,0
8,00

.....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.

Code:
5,4,CH,EQ,L(C'0008',C'0013',C'0015',C'0017'...)
Similarly multiple NE/ANDs can be simplified as
Code:
5,4,CH,NE,L(C'0008',C'0013',C'0015',C'0017'...)
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

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