An old technique is to use a truncated table from the days when the amount
of storage used mattered.  This is from a macro expansion.  Often placed
at the end of the program just after the LTORG.

TRHEX    EQU   *-X'F0'
         DC    C'0123456789ABCDEF'

IBM Mainframe Assembler List <[email protected]> wrote on
08/08/2012 09:21:16 AM:

> From: Dave Day <[email protected]>
> To: [email protected],
> Date: 08/08/2012 09:24 AM
> Subject: Re: Printing a return code
> Sent by: IBM Mainframe Assembler List <[email protected]>
>
> Probably a gazillion different ways to do this, but I use an unpack
> followed by a translate.
>
>      UNPK   0(9,RX),WORD(5)
>      L          R15,=a(HXCNVTBL)
>      TR       0(8,RX),0(R15)
>      MVI    8(RX),C' '
>
>      HXCNVTBL is a 256 byte table with the correct values set for the
> translate.  You have to make sure the word you are using for the unpack
> doesn't end on a storage boundary or you 0c4.
>
>      --Dave


-----------------------------------------
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. Thank you

Reply via email to