Understanding allocation errors
The IMS Spool API interface dynamically allocates the print data set only after data is actually inserted to the data set. This reduces overhead and simplifies cleanup for abending transactions.
Occasionally, errors can occur during dynamic allocation that are the results of incorrect data set print options supplied with the CHNG or SETO call. The data set print options can be parsed during the processing of the CHNG and SETO calls. Destinations can only be validated during dynamic allocation.
If any of the print options are incorrect and dynamic allocation fails when the first insert is done for the data set, the ISRT call receives a status code of AX. The IMS Spool API code provides the following to the application program:
- A status code
- An error message DFS0013E
- A diagnostic log record (67D0)
The error message shows the type of service that is activated and the return and reason codes that are responsible for the error. For example, a common failure is indicated by reason code 046C: Remote work station not defined to job entry subsystem. You see this reason code if you select an invalid destination or you select integrity option 2 (non-selectable destination) when the destination of IMSTEMP has not been defined to JES. Specifying an invalid destination in the destination name parameter of the call results in a dynamic deallocation error when IMS deallocates the print data set.
Some of the services indicated by the error message include:
- DYN
- z/OS® dynamic allocation (SVC99)
- OPN
- z/OS data set open
- OUT
- z/OS dynamic output descriptors build (SVC109)
- UNA
- z/OS dynamic deallocation (SVC99)
- WRT
- z/OS BSAM write
Related reading: If the service is for dynamic allocation or deallocation, or for dynamic output descriptor build, see z/OS MVS Programming: Authorized Assembler Services Guide.