trailing characters. Cant get rid

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
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

trailing characters. Cant get rid

Post by ds_is_fun »

In the final stage of my job where the target is a sequential file(*.dat).
Char SQL Type columns are getting trailed by weird characters that look like small boxes which are highly unprintable.
I can view these in Wordpad but not in textpad.
I have already used the function CompactWhiteSpace,Trim, TrimB,StripWhiteSpace to get rid of these trailing characters.
Nothing seems to work. Is there a special option Im missing in Format properties that could help get rid of these characters.
Pl. suggest. Thanks in advance!
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Generally these are carriage return char.s - char(13). Try to trim them out.
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

Post by ds_is_fun »

"I have already used the function CompactWhiteSpace,Trim, TrimB,StripWhiteSpace to get rid of these trailing characters. "
I have verified the file again. They don't seem to exist when I view them on our AIX box. When I ftp over in ASCII format they get trailed in.
Any inputs??
Thanks!
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post by Eric »

As the columns you have problems with are "Char SQL Type columns" then I suspect the data does not fill the size of the Char Column and thus the 'funny' characters are a pad character.
If you don't want padding then maybe you need to change the Char length or use a VarChar?
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

Post by ds_is_fun »

i have just tried varchar and that dint seemed to tweak either. When I view the file on the AIX box the string columns don't have any 'weird' trailing characters. When I ftp it over(ASCII mode) they seem to get trailed. They are visible only from wordpad and although notepad seems place blanks in those characters and then concats with the de-limiter.
Thanks!
mouthou
Participant
Posts: 208
Joined: Sun Jul 04, 2004 11:57 pm

Post by mouthou »

I think that these special characters are internal representation of characters in every editing application. 8)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a hex editor to determine what the trailing characters are. It will then be easier to control DataStage to avoid writing them.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gh_amitava
Participant
Posts: 75
Joined: Tue May 13, 2003 4:14 am
Location: California
Contact:

Post by gh_amitava »

ds_is_fun,

Set the APT_STRING_PADCHAR parameter to "space". You can do it from Administrator.

Regards
~Amitava
oracledba
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 06, 2012 9:21 am

Post by oracledba »

try this

TrimLeadingTrailing(Trim(input column, char(13), 'T'))
Post Reply