Anne Crabtree wrote:
Working on the IEFACTRT routine and it has the following assembler statements
for getting return code ready to print on hasp:
CVD R0,RWORK GET ADDRESS OF COND FIELD
MVC M1CC-1(L'M1CC+1),=X'402120202020' MOVE IN EDIT MASK
ED M1CC-1(L'M1CC+1),RWORK+5 CONVERT RET CODE TO CHAR
However, I want the return code to print as hexidecimal instead of decimal. I
tried the following after these prior 3 statements:
NC M1CC+1(4),=4X'0F'
TR M1CC+1(4),=C'0123456789ABCDEF'
(I don't understand exactly how this works but it is how it is coded in our old
exit which used the SMF type 4 records).
Why is it not translating the decimal to hexadecimal???
----------------------<unsnip>-----------------------------------------
Anne, do this:
(Assume R0 contains X'0000010C' (268, in decimal); each work area I use
is followed by 1X'00' padding.
ST R0,RWORK rwork now contains
X'0000010C'
UNPK DWK(5),RWORK+2(3) DWK now contains X'F0F1F0FC00'
NC DWK(4),=X'0F0F0F0F' DWK now contains X'0001000C00'
TR DWK(4),=C'0123456789ABCDEF' DWK now contains X'F0F1F0C300'
MVC M1CC+1(4),DWK M1CC now contains X'??F0F1F0C3'
What messed you up was that first instruction: CVD (Convert to Decimal).
Be sure to BLANK the M1CC field; remember that you're moving 4 bytes
into a 5-byte field.
----------------------------------------------------------------------
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