Joined: 12 Jan 2004 Posts: 240 Topics: 48 Location: Maryland
Posted: Thu Oct 20, 2011 3:49 pm Post subject: Splitting a Notice Print File into 4 files
Hi Gurus,
Requirement::
Split a FB, 112 LRECL dataset. This DS to be split contains client notices.
The beginning of the set of records pertaining to a Notice contains the words 'COVER-PAGE' in column 14.
Each notice is comprised of variable number of records and the only thing consistent across the file is the word 'COVER-PAGE' at col 14 to indicate the first record of a start of a Notice.
Question::
Is there a way to do this SPLIT into 4 Files using a JCL through DFSORT or some similar utility ??? If yes, can someone please post a sample JCL.
I know this can be done through a program but if anyway possible in JCL it would be ideal.
Pls let me know if you need more information incase the requirement was not clear enough.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Oct 20, 2011 4:40 pm Post subject:
I'm not sure I understand what you want to do or how you want to do it.
It sounds like you have many groups of records like this:
COVER-PAGE
record 1
record 2
record 3
COVER-PAGE
record 4
record 5
record 6
record 7
...
and you want to split all of the input records into 4 output input files, but make sure a COVER-PAGE group is NOT split between output files ... is that correct?
Do you have a particular number of records in mind for the split (like 10K) or did you want that determined from the total number of records divided by 4?
Why did you pick 10K, 10K, 10K, 15K for the number of records in each output file?
Why not 450000/4 = 11250 records per output file or something closer to that?
Will you always have 45000 input records or can the number vary?
How exactly do you want the split done if your given number of records does not contain complete groups? For example, what if the first 3 groups had 5000, 3000 and 4000 records? Would you want 5000+3000 in output file1 or 5000+3000+4000 in output file1? What are the rules for splitting the groups? _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 12 Jan 2004 Posts: 240 Topics: 48 Location: Maryland
Posted: Thu Oct 20, 2011 4:51 pm Post subject:
Yes Frank, that is correct ! The split files should contain entire Notices and not partial. Also you understood right that each notice could have variable number of records based on the nature of the clients case.
Total number of NOTICES to be determined = Total COVER-PAGE occurance / 4.
My mistake, I assumed 45K was not divisible by 4
The number of Notice or corresponding number of Records on original file will always vary and is not limited to 45k. The example was put to indicate that if the number of notices is not evenly divisble by 4 then the excess can be put in File4.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Oct 20, 2011 5:53 pm Post subject:
This type of dynamic split by group task is rather tricky to do, but I've taken a shot at it below. See if this 3 step DFSORT/ICETOOL job gives you what you want:
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Oct 21, 2011 12:34 pm Post subject:
My job works fine on supported releases of DFSORT.
You are using z/OS DFSORT V1R5 which is NOT a supported release of DFSORT. And besides that you are using a downlevel version of V1R5 which doesn't support WHEN=GROUP.
You need to move to a supported release of DFSORT - z/OS DFSORT V1R10 for z/OS 1.10-1.11 or z/OS DFSORT V1R12 for z/OS 1.12-1.13. I can't help you with an unsupported release. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum