In <[EMAIL PROTECTED]>, on 10/24/2006
   at 04:11 PM, Anne Crabtree <[EMAIL PROTECTED]> said:

>(I don't understand exactly how this works

It's dangerous to copy code that you don't understand.

>but it is how it is coded in our old exit

Look again. You will find that the code preceeding the NC is
different.

>Why is it not translating the decimal to hexadecimal???

Why wopuld you expect it to? It's taking an EBCIDE string of digits,
removing the zones and then tranlating each unzoned digit back into a
zoned digit, giving you the string you started with. To translate a
decimal string to hexadecimal, you need to first translate it to
binary, then translate the binary to hexadecimal. Since you started
with binary, the easiest thing to do is

         ST    R0,BINWORK
         UNPK  HEXWORK(L'HEXWORK+1)
         TR    HEXWORK,TRTAB

TRTAB    EQU   *-C'0'
         DC    C'0123456789ABCDEF'

BINWORK  DS    F

HEXWORK  DS    CL8

where the DC is not in the first 240 bytes of the csect and each DS is
followed by at least one other DS.

-- 
     Shmuel (Seymour J.) Metz, SysProg and JOAT
     ISO position; see <http://patriot.net/~shmuel/resume/brief.html> 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

----------------------------------------------------------------------
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

Reply via email to