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
 

 

Abend 'APC2' while calling a sub program

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

Active User


Joined: 15 Dec 2005
Posts: 236

PostPosted: Thu Jul 12, 2012 3:15 pm    Post subject: Abend 'APC2' while calling a sub program
Reply with quote

Hi all,

My transaction tc01 ends with abend 'APC2' when a main program tcrpg100 calls the sub program tcsrpg101. I googled about the abend 'APC2' where it states that
Quote:
An illegal branch has been attempted by a Language Environment user program following an abend condition with an active handle label abend. Usually an Out-Of-Block GOTO will have resulted, implying that the program tried to branch to, for example, an inactive block.

I tried to xped the sub program tcsrpg101 where we have only production load in test region. From the above, i observe that the abend is due to GOTO statement. I like to know about 'Language Environment', experts please pitch it on more about LE.

Thanks in advance,
Murali.
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Jul 12, 2012 3:38 pm    Post subject:
Reply with quote

So what is that you want to get in to - "What is LE" or "How to solve APC2"? icon_smile.gif
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 236

PostPosted: Thu Jul 12, 2012 3:41 pm    Post subject:
Reply with quote

It looks both are related and i want to know the root cause of APC2. hope CEDF will point the CICS Command causing the abend in sub program, but interested to learn a bit about LE.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 12, 2012 4:33 pm    Post subject:
Reply with quote

LE Overview

LE Manuals
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Jul 12, 2012 5:48 pm    Post subject:
Reply with quote

Thanks Dick.

pkmurali - I won't be able to explain better than what the links from Dick might (and must) tell you, however, long back - machines were not so "independent of software" which will "run" on them. Every language will show its own tantrums, the load modules (applicable for z/OS) generated will require different LRECL, BLKSIZEs and/or RECFMs. It made it messy, because if you work with one language, the other would require totally different iterface for the things which go under the surface, to get you going. In other words - they will work in "different environments" -- LE eliminated it -- and as the name says -- it's an environment and now an IBM software product that provides a common runtime environment and runtime services to applications compiled by Language Environment-conforming compilers.

Said that, PCs still lack in this, no?
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 236

PostPosted: Thu Jul 12, 2012 9:30 pm    Post subject: Reply to: Abend 'APC2' while calling a sub program
Reply with quote

Cool Answer! Thanks for the clarification.
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 236

PostPosted: Fri Jul 13, 2012 9:25 am    Post subject: Reply to: Abend 'APC2' while calling a sub program
Reply with quote

Anuj, the APC2 got resolved, while initializing the working storage array of main program the other level tem under the group got initialized and while calling the sub program it ends with APC2. Now it is fixed. I am wondering how the APC2 abend is related, it should be ASRA abend right?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jul 13, 2012 10:27 am    Post subject:
Reply with quote

working-storage array?
do you mean COBOL Internal Table?
an array in COBOL refers to DB2 host-variables.

and there really is no need to INITIALIZE a COBOL Internal Table.

regardless of ODO or fixed-length table,
use a counter and set it to zero.
when you want to add an item to the table increase the counter by 1
and populate the new item with MOVE.
and only reference active items >0 and <=counter.

for large tables, it saves a lot of time....................................
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Jul 13, 2012 4:40 pm    Post subject:
Reply with quote

Quote:
it should be ASRA abend right?
No, it should not. The abend you got is the abend you got -- expecting that a particular abend "should" occur is lunacy or idiocy. The system does not provide "should" codes -- just what actually happened.

Furthermore, it is obvious you have not spent much time understanding the abend code APC2. "Following an abend condition" is part of the error message you quoted in your first post -- so THAT abend condition could have been an ASRA abend, but the second abend that occurred while handling the first abend has precedence, hence the APC2 code.
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 I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 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 A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm


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