User Exits › Managing User Exits › Coding Rules
Coding Rules
Specific coding rules for the entry environment and register usage and a list of return codes for each routine are provided on the following pages. Follow these general rules when coding a CA MIC exit routine:
- Note that all CA MIC routines are invoked through the standard parameter list pointed to by Register 1.
- Preserve all registers except 0, 1, and 15.
- Do not use the z/OS OPEN, CLOSE, LOAD, LINK, BLDL, or WTO facility or any other z/OS facility that implicitly or explicitly calls the WAIT supervisor.
- Do not use the STIMER or TTIMER macros.
- Provide a save area of at least 72 full words if you want to issue messages from the GCMCMDXT exit routine. If you do this, then use the subroutine provided and do not change register 11.
- Make sure that the GCMCMDXT routine uses the appropriate command authority levels in each situation. By default, TSO users are assigned a command authority level of X'0000'. The command authority level for an MCS console is established in its MCS console control block. If you change the command authority level for a TSO user or a console through a LINK command, then CA MIC uses the authority level assigned through the LINK command.
Assemble and link-edit each completed routine as an authorized load module into the authorized load library for CA MIM. The sample member named ASMEXIT in the installed CAI.CBTDJCL data set contains JCL that you can use to assemble and link-edit an exit routine.
The CA MIC exit parameter lists support four-byte console IDs, console names, and EMCS consoles. In addition, mapping macros are provided in the installed CAI.CBTDJCL data set.
The GCMRCVXT and GCMDSTXT exit parameter lists have values that rely on external systems to pass these values to the local system.
You can change some of the routing data associated with a message through the GCMSRCXT and GCMDSTXT routines. Make note of the following information if you modify this information:
- Improper modification of the MCS flags or console ID fields can cause the message to be rejected.
- Some of the routing data associated with a message, like the message ID, may be duplicated in the message text. If you want this information to be consistent, then change both the routing data and the message text.