IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Error with Floating point


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bsk_sukku

New User


Joined: 07 Mar 2007
Posts: 7
Location: hyderabad

PostPosted: Fri Nov 28, 2008 1:54 pm
Reply with quote

I am getting following error when i try to move value to floating point variable. please let me know the reason.

Error: NAT0262 Incorrect number of digits/value out of range.

code:

0080 1 #EXCH-RATE (F8)

0170 MOVE 65.12935678 TO #EXCH-RATE
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Nov 28, 2008 5:57 pm
Reply with quote

I don't know NATURAL, but from my FORTRAN days I remember floating point numbers having an exponent (3.0752 E5). If this hasn't changed you're not moving a floating point value, you're moving a decimal value -- try adding E0 to the back of the number.
Back to top
View user's profile Send private message
bsk_sukku

New User


Joined: 07 Mar 2007
Posts: 7
Location: hyderabad

PostPosted: Thu Dec 04, 2008 11:08 am
Reply with quote

DEFINE DATA LOCAL
01 #F (F8)
01 #A (A30)
END-DEFINE
*
MOVE 111111111111.2222222 TO #F
WRITE '=' #F
MOVE EDITED #F(EM=999999999999.999999999999) TO #A
WRITE '=' #A
ADD 2 TO #F
WRITE '=' #F
MOVE EDITED #F(EM=999999999999.999999999999) TO #A
WRITE '=' #A
*
END

Output is

#F: +1.111111111112222E+11
#A: 111111111111.222224748544
#F: +1.111111111132222E+11
#A: 111111111113.222219890688
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Point and Shoot )PTNS TSO/ISPF 0
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top