Ive got a unsigned comp field (FIELD3) that Im converting to ZD but it is changing the value on the output file and I cant figure out why. Ive ran it both as a FI & BI input and same result. What am I missing here? Ive got several other columns where Im doing a similar conversion and not seeing this occurrence. Thanks in advance.
Joined: 06 Jun 2008 Posts: 8526 Location: Dubuque, Iowa, USA
I just ran a BUILD=(1,4,FI,TO=ZD,LENGTH=9) on the value X'008D4A61' in DFSORT and got the output of 009259617, so most likely something in the code you did not post is overlaying the last digit. Try running only that one conversion and see what value is output.
In your example the input record must have the length 12, while output to be 22 bytes long.
The data shown have length 21, and 16 bytes instead.
Please verify all your fields offset/size, and clarify this issue.
BTW, "BI,4" stands for signed binary, not for unsigned comp