how to split single row of input into 2 output rows

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Prabhakar
Participant
Posts: 10
Joined: Mon Apr 02, 2007 6:28 pm
Location: Melbourne

how to split single row of input into 2 output rows

Post by Prabhakar »

Hi Gurus,

I am having a problem in spliting a single row of records in to 2 output rows

eg:
Input:
cust id Name Lastname age
1 Prab raj 23
2 sam rob 24

output:
Custid Name Lastname
Custid age
1 Prab Raj
1 23
2 Sam rob
2 24


Can any one suggest me which stage to choose to do this function
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You may as well use a server job - this whole thing is going to be sequential in any case.
Construct rows in a Transformer stage that contain the requisite data and newline character. Write to target sequential file as a single VarChar column with no field delimiters.
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