Exit program details

The exit program is normally called twice (once for the application and a second time for the application group) but might be called up to six times, depending on how many values are specified for the APPGRPSRC and APPSRC parameters.

When Content Manager OnDemand calls the user exit, it passes several parameters, only two of which can be changed.

These two changeable fields are as follows:
  • Application group – 60 characters. The application group name that has been determined by the input file attribute named in the APPGRPSRC parameter. For an output queue monitor that is processing spooled files, this field might contain the spooled file name or user data, for example. For a directory monitor that is processing IFS files, this field would contain one of the parts of the file name.
  • Application – 60 characters. The application name that has been determined by the input file attribute named in the APPSRC parameter. For spooled files, this field might contain the spooled file name or user data, for example. For IFS files, this field would contain one of the parts of the file name.
The additional fields that are passed to the output queue monitor exit program that should not be changed are as follows:
  • Application group type – This field tells the exit program what value was used for the application group name. For an output queue monitor, it can be *SPLFNAME, *FORMTYPE, *USERDATA, *JOBNAME, *USRDFNOPT1, *USRDFNOPT2, *USRDFNOPT3, *USRDFNOPT4, or *USRDFNDTA.
  • Application type – This field tells the exit program what value was used for the application name. For an output queue monitor, it can be *SPLFNAME, *FORMTYPE, *USERDATA, *JOBNAME, *USRDFNOPT1, *USRDFNOPT2, *USRDFNOPT3, *USRDFNOPT4, or *USRDFNDTA.
  • Instance – The name of the instance that contains the application group and application definitions.
  • Output queue – The fully-qualified output queue name from which the spooled file was taken. It can be broken up into output queue (1-10), and library (11-20).
  • Job – The full job name. If needed, it can be broken up into job name (1-10), user (11-20), and job number (21-26).
  • Spooled file number.
  • User data of the spooled file.
  • Form type of the spooled file.
  • Spooled file name.
  • User options 1 through 4 spooled file attributes.
  • User-defined data spooled file attribute.
The additional fields that are passed to the directory monitor exit program that should not be changed are as follows:
  • Application group type – This field tells the exit program what value was used for the application group name. For a directory monitor, it can be *FIRST, *SECOND, *THIRD, or *FOURTH.
  • Application type – This field tells the exit program what value was used for the application name. For a directory monitor, it can be *FIRST, *SECOND, *THIRD, or *FOURTH.
  • Instance – The name of the instance that contains the application group and application definitions.
  • Part 1 of the file name.
  • Part 2 of the file name.
  • Part 3 of the file name.
  • Part 4 of the file name.
  • Path name of the file that is being processed.
For example, if your file name is:
ODKREL.Order_Documents.Packing_List.20190214.143129.ARD
then part 1 of the file name is ODKREL, part 2 is Order_Documents, part 3 is Packing_List, and part 4 is 20190214.

A sample attribute-specific output queue monitor user exit program is provided in the source file that is named QSAMPLES2 in the QRDARS library, with member name PGM123.

A sample attribute-specific directory monitor user exit program is provided in the source file that is named QSAMPLES2 in the QRDARS library, with member name DIRMONEXIT.

Note: Any program source code that you modify should not be placed in the QRDARS library because that library is replaced during software upgrades. However, QUSRRDARS library is not replaced and can be used for your modified source. IBM recommends that you copy the original sample program source code into a backup member in case you need to go back to the original source code as shipped from IBM.