Most modules receive control and must return control in AMODE=31, and must be able to execute in cross-memory and TASK modes. Recommendations:
All routines receive control and must return control in 31-bit addressing mode (AMODE=31) and must be able to execute in RMODE ANY and AMODE=31. If you bind an exit routine as reentrant (RENT), it must be truly reentrant (for example, it cannot depend on any information from a previous iteration and it cannot store into itself). If you bind an exit routine as reusable (REUSE), it must be truly reusable (it cannot depend on any information in itself from a previous iteration), but it can depend on information that it saves in the specific block passed to it. If you bind a routine that is serially reusable, it must be used for a single database only. If you bind an exit routine as neither RENT nor REUSE, it can store into itself and depend on the information saved in the block that is passed to it. If you bind an exit routine as reentrant, it is loaded in key 0 storage to automatically protect the exit routine from being accidentally or intentionally modified. |