In article <[EMAIL PROTECTED]> you write:
>dear all,
>
>can you please show me where is my error.
>
>I read a file , which the record field is :
>first two positions : number in binary
>position 3 : string of 10  characters.
>
>my objective is to get the number in decimal
>
>I do this :
> "execio 1 diskr INDD (STEM enregt.)"
>str= substr(enregt.1,3,10)
>numberx = b2x(enregt.1,1,2)
>numberd= x2d(numberx)

If these 2 characters are a binary number, you want c2d.

I.e.:  numberc = substr(enregt.1,1,2)
       numberd = c2d(numberc)

-- 
Rich Greenberg Marietta, GA, USA richgr atsign panix.com    + 1 770 321 6507
Eastern time.  N6LRT  I speak for myself & my dogs only.   VM'er since CP-67
Canines:Val, Red & Shasta (RIP),Red, husky                   Owner:Chinook-L
Atlanta Siberian Husky Rescue. www.panix.com/~richgr/  Asst Owner:Sibernet-L

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