Page 1 of 1

how to handle the EBCDIC file the column name as first line

Posted: Wed Aug 11, 2010 8:02 pm
by yimwai
failed in using CFF stage to read a EBCDIC file .
the reason is that the file is with the column name is the data file,how the handle this situation?

Posted: Wed Aug 11, 2010 8:08 pm
by ray.wurlod
Pre-process to extract the file name.

Posted: Wed Aug 11, 2010 8:10 pm
by chulett
I don't think is a 'filename' thing but rather the fact that the first record of the file contains the column headings. In my experience that's unusual in a file of this nature and I didn't see any mention of a mechanism to tell the CFF stage that you have that going on. Is there some other method in the stage to skip the first record?

Posted: Thu Aug 12, 2010 9:14 am
by vivekgadwal
There are three ways you can handle this.

One - Ask the Mainframe people not to generate this kind of Column headers, if they are doing it specifically for you to implement the field names within DataStage as CFF stage doesn't have this capability.

Two - Read the entire row within a column in the CFF stage, and in a Transformer stage put in logic to filter this first line out.

Three - Use Unix commands to convert the file from EBCDIC to ASCII and do your processing.

Hope these steps help you...

Posted: Thu Aug 12, 2010 9:41 am
by kumar_s
Wouldn't the Cobol layout include this Column name information as well?
I beleive, there sould be a identifier, based on which, it would say, its a header (Column Name).