Topic
2 replies Latest Post - ‏2006-03-11T09:42:36Z by SystemAdmin
SystemAdmin
SystemAdmin
332 Posts
ACCEPTED ANSWER

Pinned topic Header, detail, trailing record

‏2006-02-24T16:12:26Z |
We're trying to transnform a file who's structure contains a header record, detail record, and trailing record. We're only interested in the detail record. The file is a text file.

The process that we've tried to create is

1) Read a seqeuntial file
2) pass to a transformer stage where we strip off the header and trailing record.

The detail record is that of a subscriber, or dependent, and the resulting output needs to take the subscriber record, and append all releated dependent records to the end of the subscriber record (it's really a cobol file).

We've tried the column inport stage to join on the ssn, and when passed to a datatset, the resulting format of each record looks ok, other than each subsciber or dependent piece of the record is surrounded by ()'s.

We cannot find any way to take the column import stage and pass it to a complex flat file, or even just a flat file.

Perhaps our approach needs to be adjusted. If anyone could point me in the direction of some samples, or provide me with some direction I'd appreciage it.
Updated on 2006-03-11T09:42:36Z at 2006-03-11T09:42:36Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    332 Posts
    ACCEPTED ANSWER

    Re: Header, detail, trailing record

    ‏2006-03-09T15:01:01Z  in response to SystemAdmin
    I know it's a bit late, but if your company owns DataStage TX, this is a simple exercise.
  • SystemAdmin
    SystemAdmin
    332 Posts
    ACCEPTED ANSWER

    Re: Header, detail, trailing record

    ‏2006-03-11T09:42:36Z  in response to SystemAdmin
    Server job or parallel job? It can be done in each, but the approach is different.

    In a server job your approach is valid; use constraint expression(s) in the Transformer stage to filter off the header and trailer records, probably based on some "record type" value in the row.

    In a parallel job rely on the fact that the header and trailer rows do not have the same column layout (schema) as the detail rows, and make use of the reject handling property of the Sequential File stage to direct the header and trailer rows to a "reject" link, possibly for further processing.