Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
On size error and On Overflow error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: On size error and On Overflow error
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: 3158
Location: Tucson AZ

PostPosted: Mon Jan 08, 2007 11:54 am    Post subject: Re: On size error and On Overflow error
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Tue Jan 09, 2007 6:07 pm    Post subject:
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    Post subject:
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    Post subject:
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    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 3270 Data stream error Benchwarmer CICS 4 Tue Apr 17, 2018 12:06 am
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts IMS error U4038 while executing my PL... abdulrafi IMS DB/DC 2 Thu Feb 08, 2018 1:05 pm
No new posts -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us