Page 1 of 1

Reading a Complex Flat File

Posted: Tue Feb 12, 2008 11:32 pm
by 199542
Hi ,
I am using complex Flat file for reading multiple records types within a same file .

The file is as follows

GHIJKLABCD20070918ZX
MNOPQREFGHI20070917JAHALHALJJKAHKHAKHA
------------------------------

Inabove file , the fields are as follows
1 2 3 4
GHIJKL ABCD 20070918 ZX ----- ( FIRST LINE WITH 4 FIELDS NO

SEPARATOR )
1 2 3 4 5 6
MNOPQR EFGH 20070917 JAHAL HALJJKAH KHAKHA ---- ( 2ND LINE WITH 6 fields with no separator )

Like that there are many records with different metadata.For reading this file I am using CFF parallel job .
I gave recordid constraint as GHIJKL for first record and
MNOPQ for second record.
I gave metadata for each record properly.I am directing each record to a sequential file .But in the o/p I am able to view data for only 1st recordid.Can anyone suggest the exact procedure ?

Can I direct all the records in the file with same recordid ( like MNOPQR ) to one sequential file using CFF ?

Posted: Wed Feb 13, 2008 1:27 am
by ray.wurlod
Welcome aboard.

Questions about server jobs belong in the Server Edition forum.

Posted: Wed Feb 13, 2008 8:23 am
by chulett
... and we are. :?

Is Roy secretly moving posts with no 'Hey Moderator' bait?

Posted: Wed Feb 13, 2008 9:25 am
by ArndW
I read this one while it was still in the PX forum. It has migrated through osmosis....

Posted: Wed Feb 13, 2008 3:27 pm
by ray.wurlod
Please post the actual record layout, ideally in COBOL FD format. You can process this file with a Sequential File stage; read the entire line as a single VarChar column then use the record identifier (the first six characters) to constrain output links from a Transformer stage. On each output link from the Transformer stage you parse the record appropriately using substring operators.