Event code 18 — enclave initialization event

Purpose

Perform language-specific enclave initialization. All language-specific initialization for the CICS® run unit should be performed during this call.

Syntax

Call CEEEVnnn (18, pgmmask, inpl, invoke, ioinfo, tolerate_newstk, idinfo, wsa, skipedsa)

INT4      *pgmmask;
POINTER   *inpl;
INT4       invoke;
STRUCT     ioinfo;
INT4      *tolerate_newstk;
INT4      *idinfo;
POINTER   *wsa;
INT4      *skipedsa;
pgmmask (input/output)
A fullword containing the program mask in the right-most bits. This output program mask is ignored, when event 18 is called to initialize a member that appears only in the dependent member list of a signature CSECT in the language list."
inpl (input)
The initialization parameter list for the enclave.
invoke (output/CICS only)
A fullword that is set to indicate that Language Environment should call the member language to invoke the main procedure:
0
Language Environment should invoke the main procedure directly.
1
Language Environment should give control to the member language to invoke the main procedure.

This parameter is initially set to zero and is used only under CICS. This parameter is only recognized for the member language whose main procedure is written in that language.

ioinfo (input/CICS only)
A structure describing the standard input, output, and error streams as defined by CICS. This parameter is only valid under CICS.
tolerate_newstk (input)
A fullword that indicates if the member language can support the performance enhancements to the stack extension routines. This parameter is initially set to zero when passed to the member language event handler. If the member language can tolerate the high-performance stack behavior, it should set this word to a nonzero value. If not, it should leave the value as zero. On return from the member event handler, Language Environment queries the value of the parameter and uses the appropriate stack handling code.
idinfo (input)
A fullword that indicates to the member language additional information that identifies the calling environment. Language Environment issues the enclave initialization event when a new common runtime environment is created for the set of members represented in an executable program and when an established environment needs to be augmented by adding additional members represented in a newly-loaded executable program. The following bits are defined:
0–7
Init_reason. The following values indicate the reason for the enclave initialization event.
1
The initial build of the Language Environment. The reasons for this include: batch initialization, initialization for CEEPIPI, creation of nested enclave, and CICS run-unit initialization.
2
The Language Environment was previously built and additional members need to be added to the existing environment. The reasons for this include: the dynamic call, fetch, adding routines to the CEEPIPI environment, or DLL load module which caused a load of an executable program that contains members that are new to the environment. In this case, Event Code 8 (see Event code 8 — new load module event) will follow to allow the member to obtain and initialize the WSA. Because Event Code 8 is always provided and Event Code 18 is only provided when new members are introduced into the environment, the WSA should be obtained once using Event Code 8.
8–15
dll_type. This value indicates if the executable program is a DLL; the values are defined as follows:
0
The executable program is not a DLL; it is either a load module or a program object.
1
The executable program is a DLL. This means it can export variables, functions, or both; optionally, the DLL can also import variables or functions.
17–31
Reserved; must be zero
wsa (input/output)
A fullword that contains the address of the member-obtained and initialized WSA. If idinfo indicates that the executable program is a DLL, Language Environment will save the WSA address and provide it to the DLL when the DLL is invoked.
skipedsa (output)
A fullword that indicates if DSA Exit processing may be bypassed at normal, non-abend pending, enclave termination initiated by a call from the CEETREN or CEETREC services. The default is zero, which indicates DSA Exit processing should occur as previously at enclave termination. The member sets this fullword to a non-zero value to indicate it has no requirement for Exit DSA processing at normal enclave termination.

This event is used to initialize HLL portions at the enclave level. The order in which the member event handlers are driven is first based on the ascending order of the member ID. However, if the member ID is identified by a numerically lower ID in the dependencies part of the signature CSECT, then it could be called prior to a lower ID.

All Language Environment services are available at the time of this event. The member can influence the program mask setting by placing its requirements of the program mask in the second parameter as described below.

Upon entry into the member event handler for the enclave initialization event, the following is available:

  • R1 contains the address of a standard O/S style PLIST (all of the parameters are passed by reference) with the following PLIST:
    1. Event code 18.
    2. Fullword field in which the program mask is held in the right-most bits; upon input, this field is zero.
    3. Initialization PLIST (INPL) passed to CEEINT.
    4. Fullword indicating how Language Environment should call the member language to invoke a main procedure; this parameter is initially set to zero.
    5. Structure describing the standard input, output, and error streams as defined by CICS.
    6. Fullword indicating if the member language can support performance enhancements to the stack extension routines. This parameter is initially set to zero.
    7. Fullword that indicates to the member language additional information to identify the calling environment.
    8. Fullword that contains the address of the WSA that was obtained and initialized by the member.
    9. Fullword indicating if the member language wishes to skip the Exit DSA scan at normal termination. This parameter is initially set to zero.
  • R12 addresses the CAA
  • R13 addresses a DSA
  • R14, R15 are linkage registers

In the preinitialized interface, this event is driven for main routines to complete initialization for a specific application running within an enclave. This event occurs during the CALL request for main routines to allow HLLs complete their initialization for a particular application or for a particular run of an application.

The combination of Event 17 and Event 18 should initialize the HLL specific aspects of the environment for a given application. The counterpart for this event is Event 19.

All callable services except CEE3CRE are available during Event 18. Stack storage is available.

Usage notes

  • This event is called in CICS and non-CICS environments.
  • CICS SPF: Language Environment calls languages in key 8 for this event. Storage for parameters can be in key 8.