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
 

 

IGYOP3091-W Message for On Size error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
trilokdewangan

New User


Joined: 19 Jun 2008
Posts: 39
Location: USA

PostPosted: Wed Feb 17, 2010 12:13 am    Post subject: IGYOP3091-W Message for On Size error
Reply with quote

Hello,

I have a situation here where I got IGYOP3091-W warning message for "ON SIZE ERROR" statements which compiling the program. Please see the compile listing:

Code:
002086         TRILOK          ON SIZE ERROR                                 
002087      1  TRILOK             MOVE ZERO             TO WS-RATE-CALC       
                                                                             
002087==> IGYOP3091-W Code from "MOVE (line 2087.01)" to "PERFORM (line 2097.0
                      executed and was therefore discarded.                   
                                                                             
002088      1  TRILOK             SET  WS-ON-SIZE-ERROR TO TRUE               

I use ECOBOL as a language and CMNLX2/CMNECOB as Procedure name in my shop. Please suggest if there is any compile option to execute "On Size Error" Statements.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Feb 17, 2010 12:21 am    Post subject:
Reply with quote

Hello,

Quote:
Please suggest if there is any compile option to execute "On Size Error" Statements.

Start here:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/igy3lr50/6.1.8.4

If you find something in the documentation that is not clear, post what you found and your doubt about it. Someone should be able to clarify.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Wed Feb 17, 2010 12:24 am    Post subject:
Reply with quote

I think you are misinterpreting the error message. What you are being told is that there are no circumstances under which the ON SIZE ERROR will be executed, hence the MOVE ZERO TO WS-RATE-CALC cannot be executed. Since you did not show us the code associated with the ON SIZE ERROR, we cannot do any further analysis such as determining why the ON SIZE ERROR cannot be executed.

There is no compile option required to execute ON SIZE ERROR statements -- if you code your program correctly, they are automatically used.
Back to top
View user's profile Send private message
trilokdewangan

New User


Joined: 19 Jun 2008
Posts: 39
Location: USA

PostPosted: Wed Feb 17, 2010 2:12 am    Post subject:
Reply with quote

Okay....Here is my original situation, Please see the calculation below:

Code:
COMPUTE A ROUNDED = (1+B)**365 - 1
ON SIZE ERROR                                     
   MOVE ZERO             TO B           
   COMPUTE A            =                 
      (1 + B) ** (0) - 1               
END-COMPUTE
   
Where B = +9.8542996972330937E-01


I get SOCC abend which executing the above code cause value of above calculation is exceeding the internal registor size.

To avoid this abend I simplified the code and are as follows -

Code:
PERFORM 100-XX
      THRU 100-EXIT
    UNTIL  COUNT =365
        OR   WS-ON-SIZE-ERROR

100-XX .
   COMPUTE A ROUNDED = (1+B)**365 - 1
   ON SIZE ERROR                                     
      MOVE ZERO             TO B           
      COMPUTE A            =                 
         (1 + B) ** (0) - 1         
        SET WS-ON-SIZE-ERROR TO TRUE
   END-COMPUTE

ADD +1 COUNT

100-EXIT.   EXIST.



Still I face the SOCC abend. Please suggest.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Feb 17, 2010 3:16 am    Post subject:
Reply with quote

Hello,

It is usually best to post the "real" issue. . .

How was this value for B established?
Quote:
Where B = +9.8542996972330937E-01


Found this, but have no confirmation that it is correct:
Code:
S0CC -      EXPONENT OVERFLOW EXCEPTION                                   
            A FLOATING POINT NUMBER EXCEEDS THE MAXIMUM SIZE.                 
            NOTE - THIS ERROR IS DETECTED AND FIXED IN FORTRAN


If you explain what you are actually doing (not some code snippet, but rather the business requirement), someone may have an alternative suggestion. . .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Wed Feb 17, 2010 4:23 am    Post subject:
Reply with quote

Your calculation is coming up with a value about 10 raised to the 102nd power; 10 to the 76th power is approximately as high as you are allowed to go in COBOL using a COMP-2 field. The S0CC abend is true and accurate -- and according to section 6.1.8.4 of the COBOL Language Reference manual, ON SIZE ERROR will not trap your problem.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Feb 17, 2010 4:25 am    Post subject: Reply to: IGYOP3091-W Message for On Size error
Reply with quote

Can you rework the logic and remove the exponentiation and substitute another method? Exponentiation is very high overhead for COBOL and causes BALR's to COBOL run-time routines (otherwise known as a dog with fleas) icon_eek.gif

Bill
Back to top
View user's profile Send private message
trilokdewangan

New User


Joined: 19 Jun 2008
Posts: 39
Location: USA

PostPosted: Thu Feb 18, 2010 2:11 am    Post subject:
Reply with quote

Thank you guys for suggestion. looks like I need to backtrack my analysis and try to avoid this huge calculation.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 18, 2010 2:42 am    Post subject:
Reply with quote

Hello,

If you explain what values you have to work with and what you are trying to accomplish (in business terms rather than code or algorithm), someone who has done something similar may have a suggestion.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am


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