We are extracting data from SAP IDOC extract and creating fixed width file with NLS UTF 16BE. It is not actually creating a fixed width file all the space are trimmed.
My output file has three columns
Col1 Char(08 ) sample value IBMC expecting length(08 )
Col2 Char(20) sample value CUS56UT expecting length(20)
Col3 Char(16) sample value 99991231 excepting length(16)
all three columns uses extended property to unicode.
here is the actual output i get.
IBMCUS56UT 99991231
IBMCUS56UT 99991231
any help is highly appreciated.Thank you
Fixed width file creation problem when using NLS UTF-16BE..
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The Char columns are padded with 0x00 (ASCII NUL), not with 0x20 (ASCII space). You can see this by viewing the output with a hex editor, such as UltraEdit.
You can change this behaviour by setting the value of environment variable APT_STRING_PADCHAR to 0x20.
The reason the data don't seem to be fixed length is that the C program (the data browser, for example) interprets 0x00 as "end of string".
You can change this behaviour by setting the value of environment variable APT_STRING_PADCHAR to 0x20.
The reason the data don't seem to be fixed length is that the C program (the data browser, for example) interprets 0x00 as "end of string".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.