Page 1 of 1

Different data layout in a single sequential file

Posted: Wed Sep 11, 2013 3:59 pm
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)

Posted: Wed Sep 11, 2013 4:35 pm
by ray.wurlod
Yes.

Posted: Sun Sep 15, 2013 10:43 pm
by suja.somu
what are the ways to acheive this ? Could you please explain in detail.

Posted: Mon Sep 16, 2013 2:56 am
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.