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

How to check if a CICS call failed ??


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
itzDeepak

New User


Joined: 06 Sep 2005
Posts: 12

PostPosted: Wed Sep 14, 2005 4:59 pm
Reply with quote

I'm trying to make a CICS call to a COBOL module ...

How can i catch the exception if my call failed ?
Plz advise....
Back to top
View user's profile Send private message
mallikiran

New User


Joined: 07 Sep 2005
Posts: 49

PostPosted: Wed Sep 14, 2005 7:09 pm
Reply with quote

Could you please be more specific. Possibilites I could think of are:
i) Calling using XCTL
ii) Calling using LINK
iii) Calling a Batch program from a CICS program
iv) Calling the program using LOAD.

If it is calling a batch program from a CICS program, I am sorry I do not have the answer, but at least it would help others in answering the question.
Back to top
View user's profile Send private message
p.m.s.Reddy
Warnings : 1

New User


Joined: 20 Sep 2005
Posts: 11
Location: chennai

PostPosted: Tue Sep 20, 2005 11:45 am
Reply with quote

Well said Kiran icon_smile.gif icon_biggrin.gif
Back to top
View user's profile Send private message
rakeshreddy
Warnings : 1

New User


Joined: 21 Mar 2007
Posts: 28
Location: Bangalore

PostPosted: Tue Apr 03, 2007 6:30 pm
Reply with quote

Hi all,
can any body clear me in this topic.
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 Apr 03, 2007 6:58 pm
Reply with quote

rakeshreddy wrote:
can any body clear me in this topic.
itzDeepak is asking if there is a way (other than an abend I guess icon_smile.gif ) to tell if the call he just made to his program was successful or not.....
Back to top
View user's profile Send private message
Raphael Bacay

New User


Joined: 04 May 2007
Posts: 58
Location: Manila, Philippines

PostPosted: Fri May 18, 2007 2:55 pm
Reply with quote

You can try using options i, ii, and iv of mallikiran's reply above.
You can then use respcode of the cics command. Use a field here so you can query it's value like for example:

IF WS-CICS-REP-CODE = 0
do normal
ELSE
other error handling...

Just might help.
Back to top
View user's profile Send private message
Raphael Bacay

New User


Joined: 04 May 2007
Posts: 58
Location: Manila, Philippines

PostPosted: Fri May 18, 2007 3:39 pm
Reply with quote

I have to make a correction...

XCTL, LINK, and LOAD does not have RESPCODE. Please ignore my notes above. The Handle Condition command can probably be used for this instead. Please check on how to use.

I found out though that handling errors for CALL can be made by using ON EXCEPTION. Please see below:

MOVE "REPORTA" TO REPORT-PROG
CALL REPORT-PROG
ON EXCEPTION DISPLAY "Program REPORTA not available, using REPORTB.'
MOVE "REPORTB" TO REPORT-PROG
CALL REPORT-PROG
END-CALL
END-CALL

Thanks.
Back to top
View user's profile Send private message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Mon May 28, 2007 1:25 pm
Reply with quote

You can check EIBRCODE after each CICS command is executed.
That will give you status of the command executed.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed May 30, 2007 7:39 pm
Reply with quote

XCTL, LINK and LOAD do have the respcode option. if you are doing a
os CALL to a module, this module can set the return code or in a working
storage area passed to the calling program.
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
Search our Forums:

Back to Top