If the input is 5 characters of hex-digit binary values: 05 fldin pic x value '0b01020304'. and the output should be a binary fullword (x'000b1234'=725,556): 05 fldout pic 9(8) comp value 725556. then a single move (pack) instruction, with appropriate work areas, will do the conversion: 05 wrk1-in. 07 fld-in pic x(5) value '0b01020304'. 07 filler pic x. 05 wrk1-out redefines wrk1-in pic 9(6). 05 wrk2-in pic 9(9) comp-3. 05 wrk2-out redefines wrk2-in. 07 fld-out pic 9(8) comp. 07 filler pic x.
move ... to fld-in. move wrk1-out to wrk2-in. move fld-out to ... If the input format is ascii-char-hex (x'4231323334'), then an inspect-replacing instruction can translate it to x'0b01020304'. ---------------------------------------------------------------------- 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