special characters in fixed width flat file

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
krisna
Participant
Posts: 77
Joined: Tue Apr 08, 2008 11:33 pm

special characters in fixed width flat file

Post by krisna »

Hi All,

I am reading data from an oracle table and writing to a fixed length file.

DRS stage --> Transformer --> Sequential file

Properties for file,

Final Delimeter = end
Record Delimeter = UNIX newline
Delimeter = none
quote = none

job is executing successfully, the issue is with data. iam getting a special character instead of space.

Thanks in advance
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Search DSXchange for APT_STRING_PADCHAR environment variable.

The character is not special, it's the value of that environment variable, by default 0x00 (the ASCII NUL byte).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
krisna
Participant
Posts: 77
Joined: Tue Apr 08, 2008 11:33 pm

Post by krisna »

Thank you very much, issue resolved.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Side note - Be aware that it means you aren't padding your CHAR fields to their max length, instead DataStage is using $APT_STRING_PADCHAR to do so automatically. Changing it to a space "fixes" it in the database, but it can be dangerous if the reason the field was "short" is that it is missing some data.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply