Pound sign (#) in 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
basiltarun
Premium Member
Premium Member
Posts: 15
Joined: Tue Sep 09, 2003 10:41 pm

Pound sign (#) in Column name

Post by basiltarun »

I have a target AS400 file/table with a pound sign in the column name. Example, P1STR# and P1REG#.

When typing the column name in the target DB stages, I get an error that DS cannot accept the # sign in the column name.

How can I write data into a column with the pound # sign, when DS does not allow the # in the metadata?
wahi80
Participant
Posts: 214
Joined: Thu Feb 07, 2008 4:37 pm

Re: Pound sign (#) in Column name

Post by wahi80 »

Hi,

# and $ are special characters.Check out the help manual section on handling special characters

Regards
Wah
basiltarun
Premium Member
Premium Member
Posts: 15
Joined: Tue Sep 09, 2003 10:41 pm

Re: Pound sign (#) in Column name

Post by basiltarun »

wahi80 wrote:Hi,

# and $ are special characters.Check out the help manual section on handling special characters

Regards
Wah

Thanks... I found the Help page about the # sign in the column name. I have enabled the environment variable DS_ENABLE_RESERVED_CHAR_CONVERT to True. It still gives me the error when I type the column name 'P1REG#'. The help page talks about importing the meta data (I cannot do that now due to access issues). But I want to be able to type out the column name for now.

The page mentions '__035__' as the character to replace '#'. Will that work, typing the column name as 'P1REG__035__' ??
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You could have very well tried typing in Datastage by the time you typing it here.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
gsbrown
Premium Member
Premium Member
Posts: 148
Joined: Mon Sep 23, 2002 1:00 pm
Location: USA

Post by gsbrown »

Not sure if you can do this in Parallel, but we use this workaround in server ODBC DB2 target stages.

You have to drop the # sign from the DataStage column name and change to "User Defined SQL". You then have to key in the INSERT or UPDATE statement using the # sign in your column name(s).
Post Reply