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

On size error and On Overflow error


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Mon Jan 08, 2007 11:29 am
Reply with quote

Hi Guys,

Can anyone tell me the difference between ON SIZE ERROR and ON OVERFLOW error.
Are they used interchangeably in programs or they both r different.. Please let me know

Thnx in advance
Srinath.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jan 08, 2007 11:54 am
Reply with quote

Hi Srinath,
srinathangya wrote:
Can anyone tell me the difference between ON SIZE ERROR and ON OVERFLOW error.
Are they used interchangeably in programs or they both r different.. Please let me know
I don't use either very often so I went to the Language Reference to double check and the index told the tale:
ON EXCEPTION phrase
.. CALL statement 264
.. on INVOKE statement 312
ON OVERFLOW phrase
.. CALL statement 265
.. DISPLAY statement 279
.. STRING statement 380, 389
ON phrase, SET statement 364
ON SIZE ERROR phrase
.. ADD statement 257
.. arithmetic statements 240
.. COMPUTE statement 272
.. DIVIDE statement 282
.. MULTIPLY statement 326
.. SUBTRACT statement 384, 385

Hope that helps,

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

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Tue Jan 09, 2007 3:42 pm
Reply with quote

Thompson,

I didnt get anything from what you sent. Pls. dont mistake me. What is that you thought of saying? Could you be bit more clear.
Are you asking me to refer to Language reference Manual??

Anyway thanx for responding

Reg,
Srinath.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jan 09, 2007 6:07 pm
Reply with quote

Srinath,

You want to understand the difference between the two phrases. And then you ask:
Quote:
Are you asking me to refer to Language reference Manual??
as if it were a bad thing.

I posted:
Quote:
ON EXCEPTION phrase
.. CALL statement 264
.. on INVOKE statement 312
ON OVERFLOW phrase
.. CALL statement 265
.. DISPLAY statement 279
.. STRING statement 380, 389
ON phrase, SET statement 364
ON SIZE ERROR phrase
.. ADD statement 257
.. arithmetic statements 240
.. COMPUTE statement 272
.. DIVIDE statement 282
.. MULTIPLY statement 326
.. SUBTRACT statement 384, 385
explaining that this is from the index of the language reference.

I had thought that you would look at this and see that if you wanted to look up info on "ON SIZE ERROR" you would have to decide which aspect of "ON SIZE ERROR" you needed to look at, which arithmetic type statement you needed. Similarly, I had thought that you would look at this and see that if you wanted to look up info on "ON OVERFLOW" you would have to decide which aspect of "ON OVERFLOW" you needed to look at, the CALL, the DISPLAY or the STRING.

Well I guess I'll just have to be disappointed that you "didn?t get anything" from what I sent. But what is really crushing is the idea that you hadn't yet even looked at a manual and the further feeling that to do so was beneath you.

With the attitude you are projecting, I wish you luck in your future, (but to myself I pray I never have to maintain any of your code icon_eek.gif ),

Bill

BTW, if needed I can repost this and highlight the arithmetic stataments and the verbs CALL, DISPLAY and STRING..... icon_cry.gif
Back to top
View user's profile Send private message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Tue Jan 09, 2007 7:14 pm
Reply with quote

Hi,

As per my knowledge.


On Size error used in Arithemetic operation.
i.e ADD A TO B ON SIZE ERROR
........
if the result is larger than B declartion then statement under the on size error will be fired...


Overflow :

This used in subprogram as well as String operation


i.e CALL A on OverFlow
......

if A is not found then statment under the OverFlow will be fired


Simillarly it will be used in String operation also ( i.e STRING & UNSTRING)

From my example you can understand the difference between those...

Correct me if I am wrong

Thanks
Rams
Back to top
View user's profile Send private message
csiva007

New User


Joined: 29 Sep 2005
Posts: 10

PostPosted: Tue Jan 16, 2007 2:00 pm
Reply with quote

Hi Srinath,

What Rams told is correct?



Regards
Siva
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 -> COBOL Programming

 


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 Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
Search our Forums:

Back to Top