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

On exception in cobol call


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

New User


Joined: 06 Jul 2005
Posts: 11
Location: India

PostPosted: Thu Apr 03, 2008 3:29 pm
Reply with quote

Hi,

I am using following code

CALL pgm-1 USING VAR-1
ON EXCEPTION SET exception-flag to true
END-CALL.

IF exception-flag
<trap the System-code or exception-code>
END-IF.

How can i trap exception conditon or cause there
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Apr 03, 2008 3:55 pm
Reply with quote

If it's COBOL/400, then
publib.boulder.ibm.com/infocenter/iadthelp/v7r0/index.jsp?topic=/com.ibm.etools.iseries.langref.doc/evfeb4ls81.htm
Back to top
View user's profile Send private message
tushar.zibbu

New User


Joined: 08 Mar 2007
Posts: 6
Location: Assam

PostPosted: Thu Apr 03, 2008 4:13 pm
Reply with quote

Hi Amit,
Has your problem been resolved?
Back to top
View user's profile Send private message
Amit Goswami

New User


Joined: 06 Jul 2005
Posts: 11
Location: India

PostPosted: Thu Apr 03, 2008 4:21 pm
Reply with quote

Not yet..

My problem is to return actual cause of exception.
Suppose it is due to SB37, theb how can i send back.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Apr 03, 2008 7:20 pm
Reply with quote

I don't think you will get an SB37 from a call....
The manual specifies that an exception condition occurs when the called subprogram cannot be made available, that appears to be the only condition......
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Apr 04, 2008 12:26 am
Reply with quote

Hello,

Quote:
Suppose it is due to SB37, theb how can i send back.
I suspect that you cannot.

The process will have abended and there will be no "sending back".
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top