Display "$" in output file column name

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
iskapalli
Participant
Posts: 76
Joined: Wed Jul 25, 2007 12:36 am

Display "$" in output file column name

Post by iskapalli »

Hi,

My requirement is to display the column name as "DENM_$5_A" in the output .csv file in Datastage. When i give the column name as "DENM_$5_A" in the ouput file metadata i am getting the compilation error.

Can anyone help on this.

Thanks in Advance.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You'll need to find an alternate method of delivering that first row. One possibility - don't use the automatic method but first send a static row of data to the target with those values.
-craig

"You can never have too many knives" -- Logan Nine Fingers
samyamkrishna
Premium Member
Premium Member
Posts: 258
Joined: Tue Jul 04, 2006 10:35 pm
Location: Toronto

Re: Display "$" in output file column name

Post by samyamkrishna »

This is probably because you cannot give $ as a column name.

You can give teh column name as "AAAAAAAAA"
then in the after job subroutine you can replace it with DENM_$5_A

using Sed command

sed -e "s/AAAAAAAAA/DENM_$5_A/ig" $file > /tmp/tempfile.tmp; mv /tmp/tempfile.tmp $file

This should be a workaround
iskapalli
Participant
Posts: 76
Joined: Wed Jul 25, 2007 12:36 am

Re: Display "$" in output file column name

Post by iskapalli »

Hi,

Thanks a lot. I have implemented the logic given by you. Now it is working fine.
Post Reply