Page 1 of 1

trailing characters. Cant get rid

Posted: Tue Apr 05, 2005 12:01 pm
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!

Posted: Tue Apr 05, 2005 1:06 pm
by Sainath.Srinivasan
Generally these are carriage return char.s - char(13). Try to trim them out.

Posted: Tue Apr 05, 2005 1:45 pm
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!

Posted: Wed Apr 06, 2005 4:44 am
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?

Posted: Wed Apr 06, 2005 1:32 pm
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!

Posted: Wed Apr 06, 2005 1:53 pm
by mouthou
I think that these special characters are internal representation of characters in every editing application. 8)

Posted: Wed Apr 06, 2005 4:20 pm
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.

Posted: Thu Apr 07, 2005 2:45 pm
by gh_amitava
ds_is_fun,

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

Regards
~Amitava

Posted: Thu Mar 26, 2015 8:57 am
by oracledba
try this

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