Mike: Please see my other recent post on this topic regarding the ZAP. (I think it =does= care about X'A' through X'F' in the digit positions.)
I also believe that using variable names in the INSPECT rather than literals will cause the generation of a lot of additional code to dynamically build the translate table. I might be wrong, but I don't think the compiler is smart enough to figure out that you never change WS-CONVERT-FROM or WS-CONVERT-TO, and it can therefore generate a static table. --Art At 10:48 AM 11/23/2005, Mike Bell wrote: >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. ================================================== Art Celestini Celestini Development Services Phone: 201-670-1674 Wyckoff, NJ ============= http://celestini.com ============= Mail sent to the "From" address used in this post will be rejected by our server. Please send off- list email to: ibmmain<at-sign>celestini<dot>com. ================================================== ---------------------------------------------------------------------- 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