View previous topic :: View next topic
|
Author |
Message |
venkat_India
New User
Joined: 18 Dec 2005 Posts: 7
|
|
|
|
Hi All,
When I move the alphanumeric data item to numeric data item why I am getting one zero in the trailing position.
Regards |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
HI,
Is length of both the variable same ?
Regards
Rupesh |
|
Back to top |
|
|
venkat_India
New User
Joined: 18 Dec 2005 Posts: 7
|
|
|
|
Hi
To be specific the requirement is like this.
var1 pic x(10)
var2 pic 9(10) .
var1 is having the value 123 and 7 spaces like this 123sssssss
move var1 to var2 |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Venkat,
Because the sign processing selected as one of your compiler options generates code to put (via an OI assembler instruction) an X'F' in the hi-order nibble of the low order byte of the result field.
Since there's a space (X'40') in the low order byte, it's changed to X'F0', a zero. |
|
Back to top |
|
|
venkat_India
New User
Joined: 18 Dec 2005 Posts: 7
|
|
|
|
Thank you mmwife |
|
Back to top |
|
|
|