I was hoping one of the COBOL gurus would pick up on my assembler example. I haven't tried this, so I don't know what the compiler will generate for the INSPECT (hopefully just a simple TRanslate instruction), but this is the kind of thing I had in mind. 4-byte internal-hex input goes into WS-HEX-INPUT-ARG and 8-byte external- hex output comes out in WS-HEX-OUTPUT:
01 WS-HEXWORK-AREA. 05 WS-HEX-INPUT-AREA. 10 WS-HEX-INPUT-ARG PIC X(4). 10 FILLER PIC X. 05 WS-HEX-INPUT-COMP3 REDEFINES WS-HEX-INPUT-AREA PIC S9(9) COMP-3. 05 WS-HEX-OUTPUT-AREA. 10 WS-HEX-OUTPUT PIC X(8). 10 FILLER PIC X. 05 WS-HEX-OUTPUT-DISPLAY REDEFINES WS-HEX-OUTPUT-AREA PIC S9(9). ... MOVE WS-HEX-INPUT-COMP3 TO WS-HEX-OUTPUT-DISPLAY. INSPECT WS-HEX-OUTPUT CONVERTING X'FAFBFCFDFEFF' TO 'ABDCEF'. ================================================== 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