Reading Multiple record types in a file using CFF stage

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
suneyes
Participant
Posts: 82
Joined: Mon Jul 21, 2008 8:42 am

Reading Multiple record types in a file using CFF stage

Post by suneyes »

Hi,
We have a mainframe file which has multiple record types(Header,Detail,Trailer) in it.
Each record type has its own format.
When I import the copybook structure of this file,the metadata is getting exported into 3 different record layouts.

Is there any way we can read the whole file using a single CFF stage and load different types of records into different datasets?

can we define 3 record structures in a single CFF stage?
sun
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Yes, you can declare multiple record types in a CFF stage. I am not at a DataStage client now, but you can declare various 01-level type records in the "Record" tab of the CFF stage.
suneyes
Participant
Posts: 82
Joined: Mon Jul 21, 2008 8:42 am

Post by suneyes »

ArndW wrote:Yes, you can declare multiple record types in a CFF stage. I am not at a DataStage client now, but you can declare various 01-level type records in the "Record" tab of the CFF stage.
Hi Andrw,
Thanks for the information.I was unable to add multiple records in a single cff stage. Kindly let us know the procedure to do it.This step plays a key role in our project.Thanks in advance.
sun
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I'm currently not at a DataStage client where I can post the exact steps, perhaps someone else might post the steps or you could look at the documentation for the CFF where the procedure is described. Just as in a COBOL program, you use one field to determine which record type is being used in that record and then use the appropriate record mask. All fields (for all record types) are declared but only those used for that record type are filled with data.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You could also engage your official support provider for help with this procedure that plays a key role in your project.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply