Using Abend-AID in Language Environment
This section contains basic information for Abend-AID users who are using Language Environment. In addition to showing Abend-AID’s LE support, it answers typical questions about Abend-AID’s operation in Language Environment, an IBM run-time environment. If you need general information about Language Environment, refer to the IBM z/OS Language Environment Concepts space.
Basic Operation
Abend-AID diagnoses errors occurring in programs running in Language Environment (LE). Abend-AID provides the modules LEAID and LEAID64, which are installed as abnormal termination exits (ATEs) under LE. Abend-AID gets control via the ATE to analyze and diagnose errors.
Language Environment provides its own extensive condition handling. One function is to allow applications to code user-written condition handlers. The other is to make sure registered ATEs are called by LE in the event of an error. LEAID64 (64-bit LE applications) and LEAID must be registered as LE ATEs in order for Abend-AID to be invoked when an unhandled error occurs and to create a diagnostic report. After Abend-AID produces its report, control is returned to the Language Environment.
Language Environment’s TRAP run-time parameter specifies how LE handles abends and program interrupts. TRAP(ON) causes LE to trap abends and program interrupts.
Recovering from Abends and Program Interrupts
Language Environment provides the ability for applications to recover from abends and program interrupts. Applications that wish to recover from these errors register user-written condition handlers and use the default Language Environment's TRAP (ON) run-time parameter. Logic in the user-written condition handlers determines which errors should be considered handled.
From within a user-written condition handler, a call can be made to:
LEAID, if the condition is severity 2 or greater, to report on the error prior to handling the condition. Note that, if the condition is not handled, Language Environment will continue processing and call other handlers and exits. If it remains unhandled, LEAID will get control again for the same error during Abnormal Termination Processing.
- CEE3ABD, to terminate the job with a specific abend code. Abend-AID will report on the abend specified by CEE3ABD.
SNAP-AID. Abend-AID will report on the call to SNAP-AID.
Unrecoverable Errors
For all unhandled conditions of severity 2 or greater, regardless whether a user-handler is present, the following occurs:
- Language Environment processes the TERMTHDACT options and depending on its value, a CEEDUMP, a U4039-0 dump (if a //SYSUDUMP DD is present), or both could possibly be produced.
Language Environment calls all registered Abnormal Termination Exits (ATEs) one at a time. LEAID and LEAID64 are Abend-AID's ATEs.If the Abend-AID ATE is registered, the Abend-AID LE condition code table (CWTABL01) gets loaded and is checked to determine if Abend-AID is to IGNORE any Language Environment conditions (such as conditions that begin with CEE, IGZ, IBM).
Once the Abend-AID report is produced, the following occurs:
If the Language Environment run-time option TERMTHDACT does not have a value of either UADUMP, UATRACE, UAONLY, or UAIMM, then #XAALE31 or LEAID64 will issue a U4039-8 user abend to the system to produce an IBM dump on behalf of the user. The dump is produced if a //SYSUDUMP or //SYSABEND DD is present and if one of the following exists:
- Abend-AID considers the abend to be unresolved.
- There is an //ABNLDUMP DD in the abending step.
- There is an //ABNLTRAC DD in the abending step.
- LEAID returns control to Language Environment.
Routing Abend-AID Output
In Language Environment, the Abend-AID report is written to an output destination chosen in the same manner as is done for normal Abend-AID processing outside of Language Environment. Normally, the Abend-AID report is written using the site default report shared directory named by CWROUTE. However, this can be overridden as follows:
- //ABNLTERM DD, which overrides
- CWEXIT02, which overrides
- CWJOBTAB, which overrides
- CWROUTE routing group specification, which overrides
- Abend-AIDCWROUTE site default report shared directory specification
If the //ABENDAID DD is not present in the application job step’s JCL, Abend-AID’s LE support dynamically allocates it, but only if the Abend-AID report is to be written to SYSOUT. To write the Abend-AID report to the //ABENDAID DD, use CWEXIT02, CWJOBTAB, or a CWROUTE routing group to designate that the report be written to SYSOUT. See Advanced-configuration guide.
LE Run-time Options
When an abnormal termination is encountered, the programmer can easily identify the LE run-time options in effect at the time of the failure, and see how and where each option was set. Abend-AID shows the setting for each option and the name of the specific option control table selected by LE. When a program is running, there are options that are obtained from many sources — the option control tables (CEEUOPT, CEEDOPT, CEEROPT) and from JCL overrides. Some options may overlap and/or conflict, making it difficult to determine why an application behaves as it does, including performance issues and how the job terminates if an error occurs.
LE User Heap Storage Analysis
Abend-AID displays the following for the LE User Heap Analysis:
- User Heap run-time parameters and variables including initial heap size, increment size, number of segments, pointer to first segment, and pointer to last segment.
- For each segment in the User Heap:
- Analysis summary for each segment in the User Heap:
- number of elements
- size of allocated storage
- number of free elements
- size of storage still available in the segment
- number of element allocation errors
- A display, by field, of each header in each segment.
- A display of the allocation map for each segment. An entry is displayed for each element in each segment with its associated data address, data length, and status (allocated or free).
- Validation for each element in a segment for allocation errors. If an allocation error is detected, the element is identified and the following is provided:
- Storage surrounding the element in error
- Storage that the elements in error are pointing to
- Storage of the previous (last good) element, which may be suspect in overlay errors.
- Analysis summary for each segment in the User Heap:
Frequently Asked Questions
Does
Abend-AID
work in Language Environment?Yes! IBM, as originally requested by BMC, provides the CEEEXTAN abnormal termination exit CSECT. BMC uses the abnormal termination exit to allow Abend-AID to get control in order to produce an Abend-AID report. Abend-AID provides the module LEAID, which is installed as an abnormal termination exit (ATE). LEAID calls Abend-AID.
An ATE is invoked by LE at program termination for all “unhandled conditions” of severity 2 or greater (return code 2000 or higher). LE can terminate with one of five severity codes, 0 through 4, which correspond to job step return codes of 0000 through 4000. For example, a data exception is a severity 3 condition. Prior to LE, a COBOL program that had a data exception would end with a S0C7 abend.
What releases of LE does
Abend-AID
support?Abend-AID works with all releases of LE supported by IBM.
How do I install
Abend-AID
in LE?Installation requires ATE registration in LE. See Installing space for details.
- How do I get my SYSUDUMP?Your program usually does not abend in LE. Abend-AID provides an LE condition table that works in conjunction with the Abend-AID abend code tables. Using these tables, you can request that an IBM dump be written to the //SYSUDUMP DD. Another option is to add a //ABNLDUMP DD DUMMY to your JCL.
How do I get my
Abend-AID
reports written to my //SYSUDUMP DD?Unfortunately, you cannot. Because no abend occurs, the //SYSUDUMP DD is not opened by MVS. Any product, other than MVS, opening the //SYSUDUMP DD can cause conflicts between MVS and that product. Abend-AID instead writes to an Abend-AID report data set and, if requested, the //ABENDAID DD, which will be dynamically allocated if it is not in the JCL.
How do I specify the SYSOUT class when the
Abend-AID
report is written to the dynamically allocated //ABENDAID DD?In the JES2 environment, dynamic allocation of the //ABENDAID DD is based on a model DD. The SYSOUT class and other subparameters of the model are used for the dynamically allocated //ABENDAID DD. If a model cannot be found, or if you are operating in a JES3 site, the //ABENDAID DD is dynamically allocated with a default SYSOUT class of *. The default settings can be changed by updating global values using the Abend-AID installation dialog. For more information, see Advanced-configuration space.
How do I get my job step to terminate so my JCL works the same as before LE?LE provides a run-time option, ABTERMENC, which determines whether the job step ends with a return code or with an abend code. ABTERMENC affects only JCL processing and not dump processing.
Abend-AID ignores these abends.
- What is the TERMTHDACT run-time parameter UADUMP?Starting with LE Release 5, the run-time parameter, TERMTHDACT(UADUMP), replaced the IBM-supplied abnormal termination exit, CEEBDATX. This parameter issues a U4039-0 abend that requests an IBM dump written to the SYSUDUMP DD. It is provided by IBM to debug LE failures only and to provide an IBM dump for systems programmers. It is not intended for use by application programmers to debug program problems.
When I use CEEBDATX or the TERMTHDACT(UADUMP) run-time parameter, I always get an IBM dump regardless of the error. How can I get an IBM dump just for my S0C4 abends?An Abend-AID LE condition table is available that controls whether an IBM dump is produced. When the table specifies that an IBM dump should be produced, LEAID issues a U4039-8 abend that requests an IBM dump written to the //SYSUDUMP DD. The LE condition table, CWTABL01, is used in conjunction with the Abend-AID abend code tables.
Using these tables, you can request an IBM dump based upon the error condition and the use of CEEBDATX and TERMTHDACT (UADUMP) are not necessary. For example, you can request an IBM dump when the error condition is equivalent to a S0C4 abend. For more information, see Advanced-configuration space.
- If I already have an abnormal termination exit defined, can I still add LEAID to the table?IBM allows you to define multiple abnormal termination exists. If there is more than one name defined, the abnormal termination exits are called in the order found in the CEEEXTAN CSECT.