View previous topic :: View next topic
|
Author |
Message |
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
I am coding a varying list SELECT statement and have populated the address in SQLDA and after the Fetch cursor I can see the data populated in the storage that I allocated.
Now I have trouble reading decimal fields, suppose if the hex values are 001C. Since my store is a pic X(1000), how do I move the char field that has a hex value of 001C to a displayable format like '1'
I would appreciate any help.
Vivek. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Assuming there's a X'001C' in the first two-bytes of WS-STORE-1000 -
Code: |
03 WS-STORE-1000 PIC X(1000).
03 WS-PACKED-X PIC X(02).
03 WS-PACKED REDEFINES WS-PACKED-X PIC S9(03) COMP-3.
03 WS-DISPLAY PIC 9(03).
MOVE WS-STORE-1000 TO WS-PACKED-X.
MOVE WS-PACKED TO WS-DISPLAY.
|
At this point, WS-DISPLAY equals 001.
YMMV....
Bill |
|
Back to top |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
Thanks a lot it worked good. |
|
Back to top |
|
|
|