Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Error with Floating point

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
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    Post subject: Error with Floating point
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: 7931
Location: Bellevue, IA

PostPosted: Fri Nov 28, 2008 5:57 pm    Post subject:
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    Post subject: Floating point is not displaying values correctly just check
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    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us