Different data layout in a single sequential file

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
suja.somu
Participant
Posts: 79
Joined: Thu Feb 07, 2013 10:51 pm

Different data layout in a single sequential file

Post by suja.somu »

Is it possible to create a single fixed width sequential file from different data layouts?

the data layout are as :
Header record ( 1 record)
Detail records ( multiple records)
trailer record ( 1 record)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suja.somu
Participant
Posts: 79
Joined: Thu Feb 07, 2013 10:51 pm

Post by suja.somu »

what are the ways to acheive this ? Could you please explain in detail.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are several paradigms.

Easiest is to write the header then append the detail and trailer.

Or you could create a dummy field with value 1 to header, 2 to detail and 3 to trailer, and use a sort/merge collector on this field to bring them together.

Just a couple of ideas.
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