Space function

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
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

Space function

Post by dnat »

We want to create a fixed length file as an output. We are extracting the data from a database and in the transformer stage, we are using the function Space(x) to generate the necessary spaces needed wherever the length of the input field is lesser than the necessary length.
The job works fine, but when we view the output using "View Data" it is not showing the spaces. When we ftped the output file to windows and opened it through notepad, it is showing the spaces.
But when we open it in Edit plus, it is showing some junk characters where there are generated spaces. Is it a prblem with Space function or, could anyone tell me how to interpret this.

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

Post by ray.wurlod »

Padding is done with 0x00 (ASCII NUL) characters, not space characters, because this is the value of the APT_STRING_PADCHAR environment variable. Change this to space if you want padding to use the space character.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply