Processing different record types - cobol source files.

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
alnico_blue
Participant
Posts: 2
Joined: Wed May 17, 2006 3:43 pm

Processing different record types - cobol source files.

Post by alnico_blue »

Hello,

Hoping somebody can help. I'm working with cobol source files for the first time - so I have to deal with the fact that there are different record types within the file (header, detail and trailers). Just wondering how everybody else has dealt with this before.

I've searched the threads and can see that others have initially split the records by type, then processed the records accordingly. If there are elements within one record type (say the trailer), which can be joined to another type (detail record), one type is used as a lookup further on in the processing. I too have taken this approach - but would like to know if there is another way.

Is this typical of how cobol source files are treated in DataStage?
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. :D

Read on-line help about importing table definitions from COBOL file definitions. If there are multiple "table" definitions in an FD, then more than one table definition will be imported.

The most usual ways to work with these kinds of data is to use a Complex Flat File (CFF) stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You can explain you need to get the more suitable approach for yours.
CFF is more suitable to read and write the record sets with header, detail and trailer. Inorder to process or validate the data, it is always forced to split the records accordingly. It is possible go carry the whole set without spliting, if the datatype of detail column match with the other trailer and header. Where in most of the case it wont. And more over you need to have additional check for this Header and Trailer on row wise before transformation, which may be ineffecient.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply