Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Using HANDLE ABEND LABEL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
S0C7

New User


Joined: 19 May 2006
Posts: 26

PostPosted: Fri Nov 14, 2008 2:53 pm    Post subject: Using HANDLE ABEND LABEL
Reply with quote

Hi,

I have the following code:

Code:

EXEC CICS HANDLE ABEND LABEL (Para1) END-EXEC
EXEC CICS LINK PROGRAM (Pgm1) FROM (area1) RESP(WSRESP) END-EXEC
EXEC CICS HANDLE CANCEL END-EXEC.



Now, if we get an abend in the link, the handle would perform Para1. Would the control "go to" Para1 or would it simply perform para1 and come back to the code that follows HANDLE CANCEL...? If it's a "go to" Para 1, is there any better way to come back to the code that follows HANDLE CANCEL...? I am changing an existing program and dont want to put in much code.
Any wise ideas on how to keep the code really clean and achieve what is stated above...? icon_rolleyes.gif
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Nov 14, 2008 4:47 pm    Post subject: Reply to: Using HANDLE ABEND LABEL
Reply with quote

SOC7,

Quote:
Now, if we get an abend in the link, the handle would perform Para1. Would the control "go to" Para1 or would it simply perform para1 and come back to the code that follows HANDLE CANCEL...?


It depends on what you have coded in the PARA1.

Quote:
EXEC CICS LINK PROGRAM (Pgm1) FROM (area1) RESP(WSRESP) END-EXEC


Also do note that the handle abend will not be inherited in linked program pgm1. Simple, this handle abend would work only in this program.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Fri Nov 14, 2008 7:59 pm    Post subject:
Reply with quote

EXEC CICS HANDLE

will perfomr GO TO, it will not return to statement following HANDLE


Remove the HANDLE

and code
EXEC CICS LINK PROGRAM (PGM1) RESPONSE(WSRESP)
NOHANDLE END-EXEC.

then check WSRESP to determine if link occurred properly
Back to top
View user's profile Send private message
S0C7

New User


Joined: 19 May 2006
Posts: 26

PostPosted: Mon Nov 17, 2008 7:55 pm    Post subject: Re: Reply to: Using HANDLE ABEND LABEL
Reply with quote

Aaru wrote:
SOC7,

Quote:
Now, if we get an abend in the link, the handle would perform Para1. Would the control "go to" Para1 or would it simply perform para1 and come back to the code that follows HANDLE CANCEL...?


It depends on what you have coded in the PARA1.

Quote:
EXEC CICS LINK PROGRAM (Pgm1) FROM (area1) RESP(WSRESP) END-EXEC


Also do note that the handle abend will not be inherited in linked program pgm1. Simple, this handle abend would work only in this program.



Thanks Earl, Aaru,
I was already in favor of using RESP, but the deisgn required me to use HANDLE ABEND for the linked program.

Are we sure on the point that the HANDLE ABEND would not be inherited in the linked program? I didnt find much info on ibm's reference guide on this. If you have any doc that highlights this point then please direct me to the same.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8120
Location: East Dubuque, Illinois, USA

PostPosted: Mon Nov 17, 2008 8:37 pm    Post subject:
Reply with quote

From the Application Programming Guide:
Quote:
3.5.1.2 Link to another program expecting return

If the program receiving control is not already in main storage, it is loaded. When a RETURN command is processed in the linked program, control is returned to the program initiating the link at the next sequential process instruction.

The linked program operates independently of the program that issues the LINK command with regard to handling exception conditions, attention identifiers, and abends. For example, the effects of HANDLE commands in the linking program are not inherited by the linked-to program, but the original HANDLE commands are restored on return to the linking program. You can use the HANDLE ABEND command to deal with abnormal terminations in other link levels. Figure 76 shows the concept of logical levels.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Mon Nov 17, 2008 9:08 pm    Post subject:
Reply with quote

Quote:
Are we sure on the point that the HANDLE ABEND would not be inherited in the linked program?


My 30+ years of experience says >> YES
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Nov 18, 2008 7:00 pm    Post subject: Reply to: Using HANDLE ABEND LABEL
Reply with quote

SoC7,

Quote:
Are we sure on the point that the HANDLE ABEND would not be inherited in the linked program?


That is what the manual Says too. Refer to the manuals section.

Btw, Any specific reason for your name to be S0C7??
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts C03 ABEND sjiraga PL/I & Assembler 1 Thu Jun 01, 2017 4:51 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us