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

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
yimwai
Participant
Posts: 46
Joined: Thu Jul 01, 2010 9:34 pm

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

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

Post by ray.wurlod »

Pre-process to extract the file name.
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 »

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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
vivekgadwal
Premium Member
Premium Member
Posts: 457
Joined: Tue Sep 25, 2007 4:05 pm

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

Experience is what you get when you didn't get what you wanted
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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).
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply