Home
WebSphere MQ for z/OS
Cluster workload exits are invoked as if by a z/OS LINK in:
- Non-authorized problem program state
- Primary address space control mode
- Non-cross-memory mode
- Non-access register mode
- 31-bit addressing mode
- Storage key 8
- Program Key Mask 8
- TCB key 8
Put the link-edited modules in the data set specified by the CSQXLIB DD statement of the queue manager address space procedure. The names of the load modules are specified as the workload exit names in the queue-manager definition.
When writing workload exits for WebSphere MQ for z/OS, the following rules apply:
- You must write exits in assembler or C. If you use C, it must conform to the C systems programming environment for system exits, described in the z/OS C/C++ Programming Guide, SC09-2362.
- If using the MQXCLWLN call, link-edit with CSQMFCLW (supplied in thlqual.SCSQLOAD).
- Exits are loaded from the non-authorized libraries defined by a CSQXLIB DD statement. Providing CSQXLIB has DISP=SHR, exits can be updated while the queue manager is running, with the new version used in the next MQCONN thread the queue manager starts.
- Exits must be reentrant, and capable of running anywhere in virtual storage.
- Exits must reset the environment on return to that at entry.
- Exits must free any storage obtained, or ensure that it will be freed by a subsequent exit invocation.
- No MQI calls are allowed.
- Exits must not use any system services that could cause a wait, because this would severely degrade the performance of the queue manager. In general, therefore, avoid SVCs, PCs, and I/O.
- Exits must not issue ESTAEs or SPIEs, apart from within any subtasks they attach.
Note that there are no absolute restrictions on what we can do in an exit. However, most SVCs involve waits, so avoid them, except for the following:
- GETMAIN/FREEMAIN
- LOAD/DELETE
Do not use ESTAEs and ESPIEs because their error handling might interfere with the error handling performed by WebSphere MQ. This means that WebSphere MQ might not be able to recover from an error, or that your exit program might not receive all the error information.
The system parameter EXITLIM, which is described in the WebSphere MQ for z/OS System Setup Guide, limits the amount of time an exit may run for. The default value for EXITLIM is 30 seconds. If you see the return code MQRC_CLUSTER_EXIT_ERROR (2266 X'8DA') your exit may be looping. If you think the exit needs more than 30 seconds to complete, increase the value of EXITLIM.
Parent topic:
Writing and compiling cluster workload exit programs
qc10970_
Home