Pad string with char fields

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
sanjeev_sithara
Participant
Posts: 15
Joined: Wed May 26, 2004 6:30 am

Re: Pad string with char fields

Post by sanjeev_sithara »

Hi Nick,
U can probably set the environment variable APT_STRING_PAD_CHAR to the char which you want to be used for padding instead of null.By default DS will pad string with null.HTH
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"Pad with null" is unfortunate terminology. It actually pads with the ASCII NUL character (0x00), which is different from null (unknown value). Since C recognizes 0x00 as "end of string", this default is entirely appropriate.

If you've put space characters (0x20) into your string, they should be handled correctly under default settings.
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