General considerations when writing initialization and shutdown programs

The comments in the remainder of the section apply to both initialization and shutdown programs.

Storage keys for PLT programs

You need to consider the following (whether or not you are running CICS with the storage protection facility):

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.

Start of change Java ProgramsEnd of change

Start of changeA 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.End of change

Start of changeWhen 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:

    Start of change
  1. Create a separate PROGRAM resource definition using the same JVMCLASS attribute value and specify EXECKEY(CICS).
  2. Add the PROGRAM resource definition to the PLT.
  3. End of change

The original PROGRAM resource definition with EXECKEY(USER) can then be used subsequently.End of change

Data storage key for PLT programs

The storage key of storage used by PLT programs depends on how the storage is obtained:

Related tasks
Writing initialization programs
Writing shutdown programs
[[ Contents Previous Page | Next Page Index ]]