MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

EXPONENT-OVERFLOW EXCEPTION (SYSTEM COMPLETION CODE=0CC)

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
enge
Beginner


Joined: 12 Oct 2004
Posts: 78
Topics: 39

PostPosted: Fri Aug 25, 2017 8:06 am    Post subject: EXPONENT-OVERFLOW EXCEPTION (SYSTEM COMPLETION CODE=0CC) Reply with quote

hallo, i have to calculate a data in a formula :
Code:

COMPUTE A1WCRET-REFFN =
                    ((A1WCRET-IPRZN(A1WCRET-INDRIM) / A1WCRET-IPRZNET)
                     ** W-NESP - 1)  *  100
               ON SIZE ERROR MOVE ZEROES TO  A1WCRET-REFFN.

where:
Code:

A1WCRET-IPRZN(A1WCRET-INDRIM) = 87,5   
A1WCRET-IPRZNET = 54,496   
W-NESP = 365   

and i get :
Code:

THE SYSTEM DETECTED AN EXPONENT-OVERFLOW EXCEPTION (SYSTEM COMPLETION CODE=0CC).
 

i cannot resolve the problem. any idea?
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Fri Aug 25, 2017 8:30 am    Post subject: Reply with quote

What are the PICTURE and USAGE clauses of all relevant fields? What do you mean by "87,5"? Does this help? http://www-01.ibm.com/support/docview.wss?crawler=1&uid=swg1PI64289
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
enge
Beginner


Joined: 12 Oct 2004
Posts: 78
Topics: 39

PostPosted: Fri Aug 25, 2017 8:38 am    Post subject: Reply with quote

Code:

A1WCRET-REFFN                   PIC S9(03)V9(09) COMP-3    the result
A1WCRET-IPRZN                   PIC S9(9)V9(6) COMP-3.     87.5
A1WCRET-IPRZNET               PIC S9(09)V9(9) COMP-3     54.496
W-NESP                                PIC S9(09)V9(09) COMP-3   365

that is ((87.5 / 54.496) ^ 365 - 1) * 100
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Fri Aug 25, 2017 9:09 am    Post subject: Reply with quote

Is A1WCRET-INDRIM a subscript or index or are you multiplying it by A1WCRET-IPRZN? Please show your exact code to eliminate these types of questions. And use Code Tags.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
enge
Beginner


Joined: 12 Oct 2004
Posts: 78
Topics: 39

PostPosted: Fri Aug 25, 2017 9:18 am    Post subject: Reply with quote

sorry, forget A1WCRET-INDRIM because is just an index and the value is 1 ...the field A1WCRET-IPRZN(1) values 87.5
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Fri Aug 25, 2017 11:32 am    Post subject: Reply with quote

The problem might be your index. Remember that indexes are stored as displacements, not occurrence numbers. This is what I get:
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
       WORKING-STORAGE SECTION.
       01.
           05  A1WCRET-REFFN   PIC S9(03)V9(09) COMP-3.
           05  A1WCRET-IPRZN   PIC S9(9)V9(6)   COMP-3 VALUE +87.5.
           05  A1WCRET-IPRZNET PIC S9(09)V9(9)  COMP-3 VALUE +54496.
           05  W-NESP          PIC S9(09)V9(09) COMP-3 VALUE +365.
       PROCEDURE DIVISION.
           COMPUTE A1WCRET-REFFN =
            ((A1WCRET-IPRZN                 / A1WCRET-IPRZNET)
            ** W-NESP - 1) * 100
            ON SIZE ERROR MOVE ZEROES TO A1WCRET-REFFN.
           DISPLAY 'A1WCRET-REFFN: >' A1WCRET-REFFN '<'
           GOBACK
           .

Code:
---+----1----+----2----+----3
A1WCRET-REFFN: >10000000000}<
CFECDCE6DCCCD746FFFFFFFFFFFD4
1163953095665A0E100000000000C

Remember to also pay attention to intermediate results. They are not what you might think.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Aug 25, 2017 1:33 pm    Post subject: Reply with quote

enge wrote:

that is ((87.5 / 54.496) ^ 365 - 1) * 100


what do you think the value of the above would result in? It would end up as 1.14776E+77 and your comp-3 variable will not be able to handle it.


The question is if your intention is to calculate the exponential values why are variables defined as comp-3? shouldn't they be comp-2?
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group