File with diff record layouts

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
Shree0410
Participant
Posts: 70
Joined: Tue Nov 29, 2005 7:25 pm

File with diff record layouts

Post by Shree0410 »

Hi,
I have a file with different record layouts.

example -
record 1 is of 7 columns
record 2 is of 4 columns(not all columns are same as of record 1)
record 3 is of 6 columns(not all columns are same as of record 1 and record 2)


and the same above set of records repeat. How can I use this file as input in a DataStage job with different record layouts.

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Read all records as one column (VarChar).
Use Transformer stage to identify record type (even by counting the number of delimiters) and direct rows to the appropriate output, parsing into the correct number of columns using the Field() function.
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