row splitter

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

row splitter

Post by just4u_sharath »

i have data like 110456789234567 in Column1.
Now my output should look line 110
456
789
234
567
all in column 1. First 3 into ist row, next 3 into 2nd row etc...
how can i split the data. Is this possible using a row splitter.
What delimiter can i give for input data
ShaneMuir
Premium Member
Premium Member
Posts: 508
Joined: Tue Jun 15, 2004 5:00 am
Location: London

Post by ShaneMuir »

If its fixed length within the column, you can easily use substring functions to split into multiple fields with a character return (Char10?) to make multiple rows.

Or you could insert a delimiter after every 3 characters which you could then use to pivot the data.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Investigate the Fold() function. Fold your string into 3, make sure that the delimiter is @FM, and simply write the string into a single VarChar field with delimiter set to 000 and quote character set to 000.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply