Junk characters in char column of DB2 Table

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
sreejasadan1
Participant
Posts: 3
Joined: Wed Mar 25, 2009 8:31 am
Location: India

Junk characters in char column of DB2 Table

Post 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
Sree
tehavele
Premium Member
Premium Member
Posts: 79
Joined: Wed Nov 12, 2008 5:41 am
Location: Melbourne

Re: Junk characters in char column of DB2 Table

Post by tehavele »

Try using 0X20[space] instead of 0X0.
Tejas
sreejasadan1
Participant
Posts: 3
Joined: Wed Mar 25, 2009 8:31 am
Location: India

Re: Junk characters in char column of DB2 Table

Post 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
Sree
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sreejasadan1
Participant
Posts: 3
Joined: Wed Mar 25, 2009 8:31 am
Location: India

Post 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
Sree
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

8) Please mark the topic as Resolved using the button at the top of the sreen.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply