Chapter 5. General notes about user-replaceable programs
The comments in this chapter apply to all the user-replaceable programs described
in Part 3 of this book. The chapter is divided into the following sections:
1. “Rewriting user-replaceable programs”
2. “Assembling and link-editing user-replaceable programs” on page 436
3. “User-replaceable programs and the storage protection facility” on page 437.
Rewriting user-replaceable programs
A user-replaceable program is a CICS-supplied program that is always invoked at a
particular point in CICS processing, as if it were part of the CICS code. You can
modify the supplied program by including your own logic, or replace it with a version
that you write yourself.
There are some general considerations that you must bear in mind when creating
your own versions of user-replaceable programs:
v User-replaceable programs are all command-level programs (not user exits).
v You can code user-replaceable programs in any of the languages supported by
CICS (that is, in assembler language, COBOL, PL/I, or C). An
assembler-language version of most programs is provided, in source form, in the
CICSTS32.CICS.SDFHSAMP library. COBOL, PL/I, or C versions are provided
for some programs. The relevant chapter lists the sample programs, copy books,
and macros supplied in each case.
v You can trap an abend in a user-replaceable program by making the program
issue an EXEC CICS HANDLE ABEND command. However, if no HANDLE
ABEND is issued, CICS does not abend the task but returns control to the CICS
module that called the program. The action taken by the CICS module depends
on the user-replaceable program concerned.
v Upon return from any user-replaceable program, CICS must always receive
control in primary-space translation mode, with the original contents of all access
registers restored, and with all general purpose registers restored (except for
those which provide return codes or linkage information).
For information about translation modes, refer to the IBM ESA/370 Principles of
Operation manual.
v User-replaceable programs, and any programs invoked by user-replaceable
programs, can be RMODE ANY but must be AMODE 31.
v You must ensure that user-replaceable programs are defined as local.
User-replaceable programs cannot be run in a remote region. This applies to all
user-replaceable programs, including the autoinstall control program and the
dynamic routing program.
v User-replaceable programs produce only system dumps when a program check
occurs; they do not produce transaction dumps.
v You can use the CICS Execution Diagnostic Facility (EDF) to test
user-replaceable programs. However, EDF does not work if the initial transaction
is a CICS-supplied transaction.
© Copyright IBM Corp. 1977, 2011 435