Page 1 of 1

Handling ASCII VALUE

Posted: Sun Jun 02, 2013 4:02 am
by oracle
Hello,
Ascii value is appending end of the data for the column .Can you help us how to remove ascii value using datastage.

for example we are defaulting "1111" to db2 column which is having length of the char(15) then output coming as "1111+asciivalues.

deafult env variable in our project is APT_PADCHAR_STRING=0x0. we have tried changing env value as space , blank , but we could b't able to remove ascii value.

can some share ur idea how to handle ascii values.

Posted: Sun Jun 02, 2013 8:14 am
by chulett
WHAT ascii value? It's important to identify any characters you want to remove. I'm also curious how you changed APT_PADCHAR_STRING to a "space", I'm guessing you did not set it to "0x20" which is the hex representation of the space character that you want.

Posted: Sun Jun 02, 2013 5:10 pm
by ray.wurlod
Whatever character is defined by APT_STRING_PADCHAR will be used to pad CHAR strings.

The only way to prevent this from happening is to use VARCHAR data type.

Posted: Sun Jun 02, 2013 11:29 pm
by oracle
Resolved the ascii issue while loading char(15) column in db2 table using below changes.

Added Environment variable APT_STRING_PADCHAR=0X20
Called this Environment variable in the DB2 connector stage.

Posted: Sun Jun 02, 2013 11:38 pm
by ray.wurlod
Space is an ASCII character too, you know.

Why not mark this thread as Resolved?

Posted: Mon Jun 03, 2013 12:07 am
by chulett
Done.