You can use the %dec bif in RPG...

>>> [EMAIL PROTECTED] 12/22/2005 6:57:29 AM >>>
Hi to ALL and Merry Christmas to you.

I have a program with about 30 input numeric fields.
Decimals can be:
- none
- 1 or 2 or 3

My problem is that with the C2N2 subprocedure I can transform easely 
char variable into decimal but the transformation returns an integer 
value.
For example: if I want to transform 123.5 the result will be 1235,
not 123,15 in decimal.
Probably I haven't understood the C2N2 subprocedure but I haven't 
read nothing about it.
My problems grow since decimals are not fixed in the form and until 
now I use this solution:
to test where is the point (.) in the char variable and find the 
decimal numbers on the right of the variable.

My question is:
do you know if there is any kind of subprocedure that allows me to 
return directly a numeric value with decimals from a char ?
Example:

A=C2N2xxx('123.5') return 123,5 numeric ?

Many thanks in advance.










SPONSORED LINKS 
How to format a computer hard drive Cobol programmer Iseries 400 How to
format a computer 
YAHOO! GROUPS LINKS 

 Visit your group "Easy400Group" on the web.
   To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/wbFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Easy400Group/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to