Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
arindam111,
You can very easily split using the new WHEN=GROUP function of DFSORT available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
NOKIA 123456
AAAABBBBB
AAAABBBBB
AAAABBBBB
NOKIA AZSDFGG
AAAABBBBB
AAAABBBBB
NOKIA 123456
AAAABBBBB
AAAABBBBB
NOKIA 123456
AAAABBBBB
AAAABBBBB
NOKIA 123456
AAAABBBBB
AAAABBBBB
//FILE1 DD SYSOUT=*
//FILE2 DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=INIT,BUILD=(1,5,16X,6)),
IFTHEN=(WHEN=GROUP,BEGIN=(22,5,CH,EQ,C'NOKIA'),PUSH=(6:ID=8,SEQ=8))
OUTFIL FNAMES=FILE1,BUILD=(1,5,22),
INCLUDE=(6,8,ZD,LT,3,OR,(6,8,ZD,EQ,3,AND,14,8,ZD,EQ,1))
OUTFIL FNAMES=FILE2,SAVE,BUILD=(1,5,22)
//*
|
If you don't have the July, 2008 PTF installed, ask your System Programmer to install it (it's free).
For complete details on the new WHEN=GROUP and the other new functions available with PTF UK90013, see:
Use [URL] BBCode for External Links |
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What is done with the records after the spilt?
Quote: |
the program taking 17 hours to run in production with a millions of records in input file |
How many millions of records? One of my little processes (cobol) passes and splits around 20 million records into multiple files - in about 20 minutes. These records are about 1050 bytes long.
While this reply is not actually SORT related, i'd suggest you take the time to understand why your cobol process takes so long. I am sure there are other processes that will need to process the records that are not going to be only SORT. Knowing what is taking all of the time will still need to be determined. . . |
|