Need spaces and comma in Output column names

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
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

Need spaces and comma in Output column names

Post by sravanthi »

Hi,

I need to generate a file with coulumn names like

Date Report Produced and Country, if not USA

I have only 3 stages in job.I have i/p csv file and transformer and sequential file.

In transformer is not permitting me to do this.
Is there any possiblity to do this .

Thanks in advance.
sravanthi
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Create a text file of just the column headings you wish, then set the Sequential output stage to APPEND to that file and stream your data to it.

Column names in DataStages are like column names in SQL - there are reserved characters.
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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The Transformer stage does not use column headings at all, so your diagnosis is incorrect. It is the Sequential File stage with an input link that disallows column headings containing reserved characters.

Ken's suggested solution will work; for example use an echo command in a before-stage subroutine (ExecDOS) to write the header line, and set the Sequential File stage to append to this file.
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