Page 1 of 1

Junk characters in char column of DB2 Table

Posted: Wed Mar 25, 2009 10:38 am
by sreejasadan1
Hi All,

I am trying to derive a column from another column. In target table the derived column is CHAR18.But always its derived value wont exceed 8 character length.So datastage is padding the rest of the length with boxes of junk character.I am using environment variable APT_PADCHAR as 0x0 in job parameter.Tried changing char to varchar through out the job and also tried padchar function.I am working on DB2 database

Still it gives me boxes in target Table data.But in intermediate datasets it is not showing any junk/spaces.

Please help if anybody knows the issue

Thanks
Sree

Re: Junk characters in char column of DB2 Table

Posted: Wed Mar 25, 2009 10:42 am
by tehavele
Try using 0X20[space] instead of 0X0.

Re: Junk characters in char column of DB2 Table

Posted: Wed Mar 25, 2009 12:12 pm
by sreejasadan1
tehavele wrote:Try using 0X20[space] instead of 0X0.
Thanks for your reply..Tejas

I tried this..But still it gives me the same problem...and in our orgzn almost all project the value for apt_string_padchar value is set as 0x0 and not possible to chnage this to single space or 20x0.I can see if I give single space for this APT variable the issue is not happening

Posted: Wed Mar 25, 2009 12:18 pm
by chulett
It's 0x20 (not 20x0) for a space and you can override the environment variable in just this job, no need to change your project-level default.

Posted: Fri Mar 27, 2009 6:45 am
by sreejasadan1
chulett wrote:It's 0x20 (not 20x0) for a space and you can override the environment variable in just this job, no need to change your project-level default. ...

Hi

Thanks to you all. 0x20 option worked..

Regards
Sree

Posted: Fri Mar 27, 2009 8:02 am
by chulett
8) Please mark the topic as Resolved using the button at the top of the sreen.