All

> Shmuel Metz wrote:
>
> In <[EMAIL PROTECTED]>, on 12/05/2005
>    at 08:49 AM, Daniel Cremieux <[EMAIL PROTECTED]> said:
>
> >I am converting a rexx program to cobol and having this problem . The
> >data  is , for example x'0123'  and after conversion , it must have
> >the value 123 (decimal)
> >In rexx , the statement is : decvalue = x2d(c2x(value))
>
> No,
>
> [H:\]rexxtry
>   REXXTRY.CMD lets you interactively try REXX statements.
>     Each string is executed when you hit Enter.
>       Enter 'call tell' for a description of the features.
>   Go on - try a few...             Enter 'exit' to end.
>
> xvalue='0123'x
>   ................................................ REXXTRY.CMD on OS/2
>
> decvalue = x2d(c2x(xvalue))
>   ................................................ REXXTRY.CMD on OS/2
>
> say decvalue
>
> 291
>   ................................................ REXXTRY.CMD on OS/2
>

I also note that Daniel said x'0123' not '0123'x and they are quite
different

 Welcome to the wonderful world of interactive rexx
 Type in some REXX commands or 'exit' or 'Enter' to quit
      8 *-*   x = 0
        >L>     "0"
 IRX0100I +++ Interactive trace.  TRACE OFF to end debug, ENTER to continue.
+++
say x'f1'
 0f1
x = 5
say x'f1'
 5f1
say 'f1'x
 1
say x2d('f1')
 241
say x2d('f1'x)
 1
say x2d('41'x)
 IRX0100I +++ Interactive trace.  Error 40: Incorrect call to routine. +++
say x2d('81'x)
 10
say c2x('0123'x)
 0123
say x2d('0123'x)
 IRX0100I +++ Interactive trace.  Error 40: Incorrect call to routine. +++


HTH

Julian



Try Capscan's new online bureau at http://www.capscanintegrity.com

*****  Matchcode International "Best International Product" at IDMF  *****

*******************************************************************
This e-mail is confidential and intended solely for the use of the individual 
to whom it was addressed. If you are not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of  this message is 
strictly prohibited. Please delete any copies you may have, on any computer. 
Any views expressed in this message are those of the individual sender and do 
not necessarily represent the views of Capscan Ltd and/or its subsidiaries. 
Please be aware that Internet communications are not secure.

Capscan Limited
Head Office: Capscan Limited  Grand Union House  20 Kentish Town Road  London  
NW1 9BB
Registered in England no. 1183941

*******************************************************************

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