Joined: 07 Oct 2014 Posts: 8 Topics: 4 Location: HYDERABAD
Posted: Fri Feb 22, 2019 1:16 pm Post subject: Split the file into multiple DYNAMICALLY
Hi,
It will be great if I get an help in getting the below requirement using SORT.
I have a file with around 27 Million records (this can be vary depends on he upstream data), with record length of 350 bytes and Rec FM is FB sample is as below
Code:
111111111 0011 some other data
111111111 2002 some other data
111111111 2002 some other data
111111111 2012 some other data
111111111 2012 some other data
111111111 9999 some other data
222222222 0011 some other data
222222222 2002 some other data
222222222 9999 some other data
333333333 0011 some other data
333333333 2012 some other data
333333333 9999 some other data
here 1 to 9 bytes is the account number which has multiple segments 0011 is the starting segment and 9999 is the ending segment, I want to split the file to max 5M records each file and The output files cannot be split in between the 0011 and 9999 records need to Keep the full set in same file. _________________ Pawan K
Read thru it and 8th post in that topic has the final solution. _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 07 Oct 2014 Posts: 8 Topics: 4 Location: HYDERABAD
Posted: Tue Feb 26, 2019 5:31 am Post subject:
Hi Kolusu,
with the code I got issue for one of the scenario ex. I used the split count 7 and 7th record is the starting of the segment
Code:
INPUT:
111111111 0011 SOME OTHER DATA
111111111 2002 SOME OTHER DATA
111111111 2002 SOME OTHER DATA
111111111 2012 SOME OTHER DATA
111111111 2012 SOME OTHER DATA
111111111 9999 SOME OTHER DATA
222222222 0011 SOME OTHER DATA
222222222 2002 SOME OTHER DATA
222222222 9999 SOME OTHER DATA
333333333 0011 SOME OTHER DATA
333333333 2012 SOME OTHER DATA
333333333 9999 SOME OTHER DATA
OUTPUT:
111111111 0011 SOME OTHER DATA 01000000001 000000001
111111111 2002 SOME OTHER DATA 01000000002 000000002
111111111 2002 SOME OTHER DATA 01000000003 000000003
111111111 2012 SOME OTHER DATA 01000000004 000000004
111111111 2012 SOME OTHER DATA 01000000005 000000005
111111111 9999 SOME OTHER DATA 01000000006 000000006
222222222 0011 SOME OTHER DATA 01000000007 000000001
222222222 2002 SOME OTHER DATA 02000000001 000000002
222222222 9999 SOME OTHER DATA 02000000002 000000003
333333333 0011 SOME OTHER DATA 02000000003 000000001
333333333 2012 SOME OTHER DATA 02000000004 000000002
333333333 9999 SOME OTHER DATA 02000000005 000000003
when i Split using the POS:32 the full set for key 222222222 is getting split into two files.
could you please help be in this. _________________ Pawan K
Joined: 07 Oct 2014 Posts: 8 Topics: 4 Location: HYDERABAD
Posted: Tue Mar 12, 2019 8:54 am Post subject:
Hi Arun,
Sorry for the late Reply due to my vacation, I tried with the above and it worked.
We implemented this last Friday and our Clients were Impressed with this.
Thank you all Thanks a lot. _________________ Pawan K
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