View previous topic :: View next topic
|
Author |
Message |
rsm_deepak
New User
Joined: 06 Apr 2005 Posts: 30 Location: visakhapatnam
|
|
|
|
Can anyone suggest me the following problem:
System C complaining that a field of 2 bytes - 9(2) is not getting populated. After researching I came to know I have to move a variable from Ssytem A -> B -> C.
System A & C is having 2 bytes which is 9(2)
But the System B is having only 1 byte filler. There is no possibility that I can increase a space in system B.
So can I store a 2 byte value in system B with 1 byte &
then move the 1 byte value from B to system C which is of 2 bytes. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
not directly, but indirectly.
you can not define 1 byte a packed-decimal.
you need an intermediate field pic 9(4) comp (2 bytes)
and using redefines, access the last byte and move it using pic x(1). |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
will a packed decimal with value 15 not look like x'015F' or x'015C'
so the last byte would be x'5F' ?
you need to multiply by 10 and take the frst byte, i guess.
or take a Binary halfword s9(4) comp and take the last byte.
and better make sure, you don't pass any EBCDIC/ASCII/UNICODE conversion . |
|
Back to top |
|
|
|