I didn't see the original post (was it sent to the listserv?) but
here's how I convert "internal hex" to "external hex" in assembler.
It shouldn't be too hard to get COBOL to do the same kind of thing:
* At entry, R1 contains the address of a 4-byte field to be
* converted to external hex. At exit, R1 contains the address
* of the 8-byte return value.
*
CnvrtHex DS 0H
UNPK WorkArea(9),0(5,R1)
TR WorkArea,=C'0123456789ABCDEF'-240
LA R1,WorkArea
BR R14
*
WorkArea DS CL8 "Unpacked" hex
DS CL1 Garbage byte for UNPK
At 03:02 PM 11/21/2005, john gilmore wrote:
>It's not yet at all easy to do this in COBOL; but it will be possible, even in
>a certain sense easy, after someone implements the new standard, which makes
>bit strings available.
>
>To make clear what is involved here is a PL/I procedure:
>
>ptrhexF: procedure(ptr)
> returns(character(8))
> reorder;
>
>
[...snip...]
==================================================
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