View previous topic :: View next topic
Author
Message
Rajesh1979 New User Joined: 24 Dec 2007Posts: 9 Location: Chennai
I have 8 input files concatenated and the below SORT is used for creating 3 different output files.
But the job is running for close to 6 minutes.
Input file might have records close to 28,000,000 records.
Code:
SORT FIELDS=(9,9,CH,A,35,9,CH,A,48,1,CH,A)
OUTFIL FILES=01,INCLUDE=(100,1,CH,EQ,C'T')
OUTFIL FILES=02,INCLUDE=(100,1,CH,EQ,C'T',AND,
(101,1,CH,EQ,C'U',OR,101,1,CH,EQ,C'F'))
OUTFIL FILES=03,INCLUDE=(100,1,CH,EQ,C'I',AND,
57,3,CH,NE,C'NED')
Is there any other way we can optimize the SORT and reduce the CPU time. Please suggest.
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19244 Location: Inside the Matrix
Hello,
6 minutes is not very long for 28 million records
Use INREC to eliminate all of the records that have neither T nor I in position 100 before sorting - inrec exclusions will not be sorted to be later discarded after the sort.
If you have DFSORT, Syncsort suggestions might not help you. If you have Syncsort, your topic needs to be relocated.
Back to top
Escapa Senior Member Joined: 16 Feb 2007Posts: 1399 Location: IL, USA
If count of discarded records is more then the overhead of sorting them can be reduced as Dick has mentioned.
Code:
SORT FIELDS=(9,9,CH,A,35,9,CH,A,48,1,CH,A)
INCLUDE COND=(100,1,CH,EQ,C'T',OR,100,1,CH,EQ,C'I')
OUTFIL FILES=01,INCLUDE=(100,1,CH,EQ,C'T')
OUTFIL FILES=02,INCLUDE=(100,1,CH,EQ,C'T',AND,
(101,1,CH,EQ,C'U',OR,101,1,CH,EQ,C'F'))
OUTFIL FILES=03,INCLUDE=(100,1,CH,EQ,C'I',AND,
57,3,CH,NE,C'NED')
Back to top
Skolusu Senior Member Joined: 07 Dec 2007Posts: 2205 Location: San Jose
Rajesh1979,
Ideally I would use these control cards
Code:
//SYSIN DD *
INCLUDE COND=(100,1,CH,EQ,C'T',OR,
100,2,SS,EQ,C'TU,TF',OR,
(100,1,CH,EQ,C'I',AND,57,3,CH,NE,C'NED'))
SORT FIELDS=(9,9,CH,A,35,9,CH,A,48,1,CH,A)
OUTFIL FILES=01,INCLUDE=(100,1,CH,EQ,C'T')
OUTFIL FILES=02,INCLUDE=(100,2,SS,EQ,C'TU,TF')
OUTFIL FILES=03,INCLUDE=(100,1,CH,EQ,C'I',AND,57,3,CH,NE,C'NED')
//*
Back to top
Please enable JavaScript!