Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
EnjoyMF

New User

Joined: 27 May 2005
Posts: 88

 Posted: Fri Dec 15, 2006 4:44 pm    Post subject: split a single record into multiple records Hi all i need to split the records based on the length Input ( lets say it's of length 160) Record1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCC Record2 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCC Record3 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCC Output ( 50 for each records so tatal 9 records) Record1,2,3 based on 1st record of input AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCCC Record4,5,6 based on 2nd record of input AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCCC Record 7,8,9 based on 3rd record of input AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCCC Can some one please explain how can this be done Regards Prasad

William Thompson

Global Moderator

Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

 Posted: Fri Dec 15, 2006 5:28 pm    Post subject: You need to be a bit more percise, fixed or variable (the length of the Bs changed)? Are the splits always at the smae column?
Arun Raj

Moderator

Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

 Posted: Fri Dec 15, 2006 5:46 pm    Post subject: Hi EnjoyMF Can you be more clear on your problem.You want to split the record on the basis of length only or the content( A's and B's......) Thanks Arun
Rajen

New User

Joined: 05 May 2005
Posts: 61

 Posted: Fri Dec 15, 2006 6:35 pm    Post subject: Re: split a single record into multiple records Hi Prasad, From your input and expected output it seems like you want to write a new record whenever there is change in input charactor from your i/p record. If this is what you are asking for then tell me if the i/p is like CCCCCAAAAAAAAAABBBBBBBBBB BBBBBAAAAACCCCCCCCCCC then what is your expected output? Is it as shown below. CCCCC AAAAAAAAAA BBBBBBBBBB BBBBB AAAAA CCCCCCCCCCC Here what i am asking is when you segregate records there may a case in which you have 2 charactor popping in your expected one by one.
ajaygowda

New User

Joined: 14 Oct 2006
Posts: 2
Location: bangalore

 Posted: Tue Dec 19, 2006 7:03 pm    Post subject: Hey Buddy......! hey......... U can use the SORT UTILITY for doin wat u hav described above... //sysin dd * option copy outfil fnames=file1,include=(startin pos, length, type, key) outfil fnames=file2,include=(startin pos, length, type, key) outfil fnames=file3,include=(startin pos, length, type, key) /* try this out n reply back regards AJAY
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us