Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

split a single record into multiple records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
EnjoyMF

New User


Joined: 27 May 2005
Posts: 88

PostPosted: Fri Dec 15, 2006 4:44 pm    Post subject: split a single record into multiple records
Reply with quote

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
Back to top
View user's profile Send private message

William Thompson

Global Moderator


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

PostPosted: Fri Dec 15, 2006 5:28 pm    Post subject:
Reply with quote

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?
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Fri Dec 15, 2006 5:46 pm    Post subject:
Reply with quote

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
Back to top
View user's profile Send private message
Rajen

New User


Joined: 05 May 2005
Posts: 61

PostPosted: Fri Dec 15, 2006 6:35 pm    Post subject: Re: split a single record into multiple records
Reply with quote

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.
Back to top
View user's profile Send private message
ajaygowda

New User


Joined: 14 Oct 2006
Posts: 2
Location: bangalore

PostPosted: Tue Dec 19, 2006 7:03 pm    Post subject: Hey Buddy......!
Reply with quote

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
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us