Using the Data Set Name user exit
When you request dynamic allocation of the output image copy data set, you can let the Image Copy utility determine the data set name, or you can provide a Data Set Name user exit routine to supply the data set name.
If input image copy and input change accumulation data set names are present, the utility passes the names to the Data Set Name user exit. This action provides an opportunity to create a second image copy data set and lets you assign the name to the second data set.
To use the Data Set Name user exit, you must provide a load module named ICP$DSN or RCU$DSN.
The utility searches for the data set name user exit routine in the STEPLIB library concatenation. The utility first searches for a load module named ICP$DSN; if this module is not found, the utility searches for a load module named RCU$DSN.
When the exit is supplied, the utility calls the Data Set Name user exit prior to the dynamic allocation of an output image copy data set. When the exit receives control, registers 0 and 1 point to parameter areas containing information about the data set being allocated. The user exit may examine the information supplied to help it determine the data set name to be used.
If you specify the SCAN(Y) keyword, the utility validates the generated data set name and displays the name in the processing log. You can use this keyword to test changes to model data set names or to the exit routine without building the output data set.
The following restrictions apply:
- The exit routine must be reentrant. It may be called asynchronously by multiple tasks.
- The exit routine must save all registers on entry and restore them prior to returning. On return, register 15 must contain a return code. A return code of zero indicates normal completion of the user exit. A nonzero return code indicates an error; the utility abnormally terminates the associated task.
- The exit routine must make no assumptions about the addressing mode used at run time. It may be called in either 24- or 31-bit mode and must return in the same mode. The parameter areas passed to the exit routine reside in 24-bit storage.
- The register save area provided in register 13 at entry is prechained. The word at offset 8 from register 13 already contains the address of the next save area available and may be loaded by the exit routine. In any case, the exit routine must not modify the word at offset 8 from register 13 at entry.
Related topic