Header in the output file

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
saini
Participant
Posts: 18
Joined: Sat Jan 13, 2007 12:01 am

Header in the output file

Post by saini »

Hi,

How can we add header to the output file?
I need to generate a file which has column name along with the records.
How can I get the column names in the job.

Thanks!!!
saini
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

If you don't like the column names used in the job design then don't use the option to include column names as the first line in the sequential file. Consider creating a blank text file with just your custom column names as the only line of data. Then, from your job just Append to existing file when writing out the rows.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Is that two different question or the same question?
If you want to add Header, based on content, you can choose, the first name as columsn name option or use After job subroutine or ExecuteCommand Stage.
If Filename should be the header, then prefer the later options, by passing the Filename as parameter.
If you like to pass the filename for all the records, include, "FileNameColumn" option from the Input sequential file stage.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply