Restrictions: The following restrictions
apply to this example:
- This sample was designed to be a basic example of a memory service
exit, and was not designed with other system considerations in mind,
such as the z/OS XML parser running
in cross memory mode, SRB mode, or in a different key, for instance.
- This sample is not designed to work with any other service exits.
The exit workarea is assumed to be used by this memory service exit
only. (Note that both GXLGST and GXLFST services are considered as
one service exit). As a result, this memory service exit can only
work independently, with no other service exits running.
This
sample frees an area of memory passed by the z/OS® XML parser. For the exit service, see GXLFST31 (GXLFST64) — free memory. AMODE 31 callers use GXLE1FRM. AMODE
64 callers use GXLE4FRM.
Register 14 is used to store the return
address, which must be kept intact in order to exit this subroutine
correctly.
This example assumes register one, which is passed
in from the caller, contains the address of the parameter list. The
following input variables are used in the example:
- SYS_SVC_PARM
- Address of storage area that the caller of the z/OS XML parser wants to pass
on to the exit.
- MEMORY_LEN
- Contain the length of the memory area requested to be free.
The following output variables are used in the example:
- MEMORY_ADDR
- The address of the memory to be freed.
- EXIT_DIAG_CODE
- Contains diagnostic information.
- XSM_DC_INVALID_EYECATCHER_STR
- Eye catcher is incorrect.
- XSM_DC_FAIL_FREE_MEM31
- Fail to release storage memory.
- RETCODE
-
- XSM_RC_FAILURE
- Unable to free memory
- XSM_RC_SUCCESS
- The storage macro released the allocated memory successfully (greater
than zero if deallocation failed).
- EXIT_DIAG_CODE
-
- XSM_DC_INVALID_EYECATCHER_STR
- Eye catcher is incorrect.
- XSM_DC_FAIL_FREE_MEM31
- Fail to release storage memory.