View previous topic :: View next topic
|
Author |
Message |
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
So what is that you want to get in to - "What is LE" or "How to solve APC2"? |
|
Back to top |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
Cool Answer! Thanks for the clarification. |
|
Back to top |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|