Page 1 of 1

Convert PD to unsigned integer

PostPosted: Sat Jan 14, 2012 2:55 am
by fornanthakumar
Hi,

Using DFSORT,

MY input data is

00000000
0000600D

I want my output should be 0000000000600000

So I tried,

(1,8,PD,TO=ZD,LENGTH=16)

But i am getting 000000000060000} .. i tried using other formats like FS,LS,TS,CLO,CST..

Please someone help me out on this issue.

Re: Convert PD to unsigned integer

PostPosted: Sat Jan 14, 2012 5:30 am
by Frank Yaeger
Your PD value has a D sign so it is a negative number (-60000) and is correctly represented in ZD as X'F0...F6F0F00F0F0D0' which looks like '0...60000}'.

If you really want the absolute value, you can use:

(1,8,PD,M11,LENGTH=16)

That would display '0...60000' for your negative PD value but the sign will be lost.

If you really want -0...60000' or something else, tell me exactly what you want using various examples of input and output.