Page 1 of 1

Display "$" in output file column name

Posted: Tue Mar 29, 2011 6:19 am
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.

Posted: Tue Mar 29, 2011 7:03 am
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.

Re: Display "$" in output file column name

Posted: Tue Mar 29, 2011 7:05 am
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

Re: Display "$" in output file column name

Posted: Wed Mar 30, 2011 11:04 pm
by iskapalli
Hi,

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