Reading a Complex Flat File

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
199542
Participant
Posts: 41
Joined: Sat Dec 29, 2007 2:42 am

Reading a Complex Flat File

Post 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 ?
gikjpjj
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

Questions about server jobs belong in the Server Edition forum.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

... and we are. :?

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

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I read this one while it was still in the PX forum. It has migrated through osmosis....
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
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