use this instead
        10 WS-UNPK              PIC  9(9)V.
        10 WS-PACK.
           15  WS-PACKN                   PIC S9(9) COMP-3.
******************************************************************
* CONVERT X'FA' THRU X'FF' TO CHAR A THRU F                      *
* TRANSLATE TABLE                                                *
******************************************************************
        10 WS-CONVERT-FROM                PIC X(6)
                VALUE X'FAFBFCFDFEFF'.
        10 WS-CONVERT-TO                  PIC X(6)
                VALUE 'ABCDEF'.
with this for code
       MOVE 0 TO WS-PACKN
       MOVE WS-CONNECT-REASCD-X (1:4) TO WS-PACK (1:4)
       MOVE WS-PACKN TO WS-UNPK
       MOVE WS-UNPK (1:8) TO PRINT-VALUE (1:8)
       INSPECT PRINT-VALUE (1:8)
           CONVERTING  WS-CONVERT-FROM TO WS-CONVERT-TO
The ZAP does not care about the embedded A thru F in the digits position -
It only checks the sign nibble. See POP for deteails.
This is the code I use to display DB2 return codes so I know it handles
c,d,e and f in digits position.
the code to leave the sign + 1 digit of decimal is there to prevent S0C7 on
the sign nibble.

Mike

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to