Split records into multiple records



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Split records into multiple records

Postby zlzlzlzl » Thu May 29, 2014 11:49 am

Hi All,

I need help in trying to split a single records into multiple records with key.

For example, I have this record P12345AAAABBBBCCCCDDDD, it is a fixed length record.

I would want it to be split into

P12345AAAA1
P12345BBBB2
P12345CCCC3
P12345DDDD4

where A = 1, B = 2, C= 3 and D= 4.

Can this be done using sort or icetool?

Thanks in advance.
zlzlzlzl
 
Posts: 2
Joined: Thu May 29, 2014 11:43 am
Has thanked: 0 time
Been thanked: 0 time

Re: Split records into multiple records

Postby BillyBoyo » Thu May 29, 2014 11:57 am

Yes, if you have an up-to-date DFSORT, ICETOOL has a RESIZE Operator.

If you don't have RESIZE, then use of the slash-operator (/) on OUTFIL will allow you to write multiple records from a single input record.

OUTFIL BUILD=(RECORD-KEY,DATA1,
             /,
              RECORD-KEY,DATA2,
             /,
              RECORD-KEY,DATA3,
             /,
              RECORD-KEY,DATA4)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Split records into multiple records

Postby zlzlzlzl » Thu May 29, 2014 12:13 pm

Thanks for the reply. The system that I am using do have resize operator.

May I know how do I use this resize function? If possible can you give me an example? Thanks a lot.
zlzlzlzl
 
Posts: 2
Joined: Thu May 29, 2014 11:43 am
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post