CEELOAD is used to dynamically load a Language Environment-conforming routine. It does not create a nested enclave, so the target of CEELOAD must be a subroutine.
There is no corresponding service to delete Language Environment-conforming routines. You should not use system services to delete modules that you load using CEELOAD; during thread (if SCOPE=THREAD) or enclave (if SCOPE=ENCLAVE) termination, Language Environment deletes modules loaded by CEELOAD.
If CEELOAD completes successfully, the address of the loaded routine is found in R15. You can then invoke the routine using BALR 14,15 (or BASSM 14,15).
Language Environment returns the address of the target routine with the high-order bit indicating the addressing mode (AMODE) of the routine. Language Environment-enabled programs return in the AMODE in which they are entered. Because Language Environment does not provide any AMODE switching on behalf of the target routine, you must provide any necessary AMODE switching code.
Syntax >>-label--CEELOAD--+---------------------+--,-------------------> +-NAME=--name---------+ '-NAMEADDR=--nameaddr-' >--+---------------+--,--+-----------------+--,-----------------> +-SCOPE=ENCLAVE-+ '-FEEDBACK=fbcode-' '-SCOPE=THREAD--' >--+--------------------+-------------------------------------->< +-MF=I---------------+ +-MF=L---------------+ '-MF=(E,--ctrl_addr)-'
Symbolic feedback code | Severity | Message number | Message text |
---|---|---|---|
CEE000 | 0 | — | The service completed successfully. |
CEE3DC | 3 | 3500 | Not enough storage was available to load module-name. |
CEE3DD | 3 | 3501 | The module module-name was not found. |
CEE3DE | 3 | 3502 | The module name module-name was too long. |
CEE3DF | 3 | 3503 | The load request for module module-name was unsuccessful. |
CEE39K | 1 | 3380 | The target load module was not recognized by Language Environment. |
CEE38M | 3 | 3350 | CEE3ADM or CEE3MBR could not find the event handler. |
CEE38N | 3 | 3351 | CEE3ADM or CEE3MBR could not properly initialize the event handler. |
CEE38V | 2 | 3359 | The module or language list is not supported in this environment. |
Only one of the MF=I, MF=L, or MF=(E, ctrl_addr) parameters can be coded for the same macro invocation. If none is coded, the immediate form of the macro is used.
CLOADTST CEEENTRY MAIN=YES,PPA=LEPPA,AUTO=DSALGTH
********************************************************
* Copy parameters to be passed to CEELOAD
********************************************************
MVC LOADPL(PLLEN),PLLIST
********************************************************
* Invoke CEELOAD to load module HIWORLD
********************************************************
CEELOAD MF=(E,LOADPL) LOAD ROUTINE
********************************************************
* Pass control to HIWORLD
********************************************************
BALR 14,15 INVOKE ROUTINE
********************************************************
* Invoke CEETERM to return to Caller
********************************************************
CEETERM RC=(15),MF=(E,DSARPL) BACK TO CALLER
********************************************************
* Constants
********************************************************
PLLIST CEELOAD MF=L,NAME=HIWORLD,SCOPE=THREAD
PLLEN EQU *-PLLIST
LEPPA CEEPPA ,
********************************************************
* Mappings
********************************************************
CEECAA , LE/370 COMMON ANCHOR AREA
********************************************************
* Workarea and DSA
********************************************************
CEEDSA , LE/370 DYNAMIC STORAGE AREA
DSARPL CEETERM MF=L
DS 0F
LOADPL DS XL(PLLEN)
DSALGTH EQU *-CEEDSA
END
When using CEELOAD to load a C module, the function or functions within this module must not be designated as fetchable. The #pragma linkage (xxx,fetchable) directive should not be coded in the module. Instead, such modules should be fetched using the fetch() function.