The comments in the remainder of the section apply to both initialization
and shutdown programs.
- It is recommended that you terminate all PLT programs with an
EXEC CICS RETURN command.
- PLT programs receive control in primary-space translation mode.
(For information about translation modes, see the IBM® ESA/370 Principles of Operation manual.) They must return
control to CICS® in the same mode, and must restore any general
purpose registers or access registers that they use.
- All PLTPI programs run under the CICS internal
transaction name CPLT. Therefore, because CICS internal
transactions are defined with the WAIT indoubt attribute set to 'YES',
an in-doubt failure that occurs while running a PLTPI program causes
the relevant unit of work to be shunted. The PLTPI program abends ASP1, and CICS runs
the next program defined in the PLTPI table, if any.
- PLTSD programs run under the transaction that issued the PERFORM
SHUTDOWN command. The CEMT transaction is defined with WAIT(YES).
Therefore, if shutdown is as the result of a CEMT PERFORM SHUTDOWN
command, an in-doubt failure that occurs while running a PLTSD program
causes the unit of work to be shunted. If, however, shutdown is as the result
of a user transaction issuing an EXEC CICS PERFORM SHUTDOWN command,
whether an in-doubt failure causes the unit of work to be shunted or a forced
decision taken depends on the indoubt attributes of the user transaction.
For details of the indoubt options of the CEDA DEFINE TRANSACTION
command, see the CICS Resource Definition Guide.
You need to consider the following (whether or not you are running CICS with
the storage protection facility):
- The execution key in which your PLT programs are invoked
- The storage key of data storage obtained for your PLT programs.
Execution key for PLT programs
At PLT time CICS handles Java and non-Java programs differently.
Non-Java Programs
CICS always gives control to PLT programs in CICS key.
Even if you specify EXECKEY(USER) on the program resource definition, CICS forces CICS key
when it passes control to any PLT programs invoked during initialization
or shutdown. However, if a PLT-defined shutdown program
itself passes control to another program (via a link or transfer-control
command), the program thus invoked executes according to the execution
key (EXECKEY) defined in its program resource definition.
Important
You are strongly recommended to specify EXECKEY(CICS) when
defining both PLT programs and programs to which a PLT program passes
control.
Java Programs
A Java program in the PLT runs in the key defined in its
PROGRAM resource definition (EXECKEY) and is not overridden to run
in CICS key, unlike all other program types.
When a Java program runs, a JVM is created if one does
not already exist for that JVM profile in the key the program is running.
If REUSE=YES is specified in the corresponding JVM profile, the JVM
persists after the Java program has ended. If a Java program, that
is defined as EXECKEY(USER), was overridden to start in CICS key at
PLT time, any subsequent calls of that program would run in USER key
and would therefore not be able to reuse the JVM created when the
program ran at PLT time. Other Java programs that are defined with
EXECKEY(USER) and use the same JVM Profile would also not be able
to access the JVM that is started at PLT time. Therefore, CICS does
not override the execution key of Java programs at PLT time. To run
an EXECKEY(USER) Java program in CICS key at PLT time do the following:
- Create a separate PROGRAM resource definition using the same JVMCLASS
attribute value and specify EXECKEY(CICS).
- Add the PROGRAM resource definition to the PLT.

The original PROGRAM resource definition with EXECKEY(USER)
can then be used subsequently.
Data storage key for PLT programs
The storage key of storage used by PLT programs depends on how
the storage is obtained:
- Any working storage requested by the PLT program is in the key
set by the TASKDATAKEY of the transaction under which the PLT program
is invoked. In the case of those PLT programs that run during initialization
(PLTPI programs), the transaction is always an internal CICS transaction,
in which case the TASKDATAKEY is always CICS. In
the case of those programs that run during shutdown (PLTSD programs),
it depends on the transaction you use to issue the shutdown command.
If you issue a CEMT PERFORM SHUTDOWN command, the TASKDATAKEY is always CICS.
If you run a user-defined transaction, to invoke a program that issues
an EXEC CICS PERFORM SHUTDOWN command, the TASKDATAKEY can be either
USER or CICS.
- PLT programs can use EXEC CICS commands to obtain storage by issuing:
- Explicit EXEC CICS GETMAIN commands
- Implicit storage requests as a result of EXEC CICS commands that
use the SET option.
The default storage key for storage obtained by EXEC CICS
commands is set by the TASKDATAKEY of the transaction under which
the PLT program is invoked, exactly as described for working storage.
As
an example, consider a transaction defined with TASKDATAKEY(USER)
that causes a PLT shutdown program to be invoked. In this case, any
implicit or explicit storage acquired by the PLT program by means
of an EXEC CICS command is, by default, in user-key storage. However,
on an EXEC CICS GETMAIN command, the PLT program can override the
TASKDATAKEY option by specifying either CICSDATAKEY or USERDATAKEY.

[[ Contents Previous Page | Next Page Index ]]