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

Abend 'APC2' while calling a sub program


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

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Thu Jul 12, 2012 3:15 pm
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

Superior Member


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

PostPosted: Thu Jul 12, 2012 3:38 pm
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: 271

PostPosted: Thu Jul 12, 2012 3:41 pm
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
Reply with quote

LE Overview

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

Superior Member


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

PostPosted: Thu Jul 12, 2012 5:48 pm
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: 271

PostPosted: Thu Jul 12, 2012 9:30 pm
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: 271

PostPosted: Fri Jul 13, 2012 9:25 am
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jul 13, 2012 4:40 pm
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 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 Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
Search our Forums:

Back to Top