View previous topic :: View next topic
|
Author |
Message |
itzDeepak
New User
Joined: 06 Sep 2005 Posts: 12
|
|
|
|
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 |
|
|
mallikiran
New User
Joined: 07 Sep 2005 Posts: 49
|
|
|
|
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 |
|
|
p.m.s.Reddy Warnings : 1 New User
Joined: 20 Sep 2005 Posts: 11 Location: chennai
|
|
Back to top |
|
|
rakeshreddy Warnings : 1 New User
Joined: 21 Mar 2007 Posts: 28 Location: Bangalore
|
|
|
|
Hi all,
can any body clear me in this topic. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
rakeshreddy wrote: |
can any body clear me in this topic. |
itzDeepak is asking if there is a way (other than an abend I guess ) to tell if the call he just made to his program was successful or not..... |
|
Back to top |
|
|
Raphael Bacay
New User
Joined: 04 May 2007 Posts: 58 Location: Manila, Philippines
|
|
|
|
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 |
|
|
Raphael Bacay
New User
Joined: 04 May 2007 Posts: 58 Location: Manila, Philippines
|
|
|
|
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 |
|
|
pingte
Active User
Joined: 03 Dec 2005 Posts: 120 Location: india
|
|
|
|
You can check EIBRCODE after each CICS command is executed.
That will give you status of the command executed. |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
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 |
|
|
|