Processing DEST Information

The spool.cpy copybook in the cpylib folder in the product installation includes two fields, DEST-NODE ((TAG)-dest-node) and DEST-USERID ((TAG)-dest-userid). These fields hold the values of either a SYSOUT DEST= statement on the DD card or a JES2 /* ROUTE PRINT NODE statement. The order of precedence of these and the OUTPUT statement DEST value is different so a printer exit must determine which option to use.

The (TAG)-dest-source-is field in the spool.cpy copybook holds a space if the source of the DEST information is a SYSOUT DEST= statement. It the values are set from a /*ROUTE PRINT statement, then the field holds the value of (TAG)-dest-source-is-route.

To decide which value to use, a printer exit needs to check the spool copybook DEST-NODE field for a value. Then:

If a value is found, the exit needs to check if (TAG)-dest-source-is is equal to (TAG)-dest-source-is-route:

  • If (TAG)-dest-source-is is equal to (TAG)-dest-source-is-route - the exit then should also check to see if there is a DEST value in the OUTPUT statement associated with the dataset. And, if there is such value, then it should use the OUTPUT statement value for DEST.
  • If (TAG)-dest-source-is differs from (TAG)-dest-source-is-route, the printer exit should use the values of the DEST-NODE and DEST-USERID fields in the spool.cpy copybook.

For an example of how to pick these values up, see the sample printer exit, sampprnx.cbl, which is stored in the src\enterpriseserver\exits folder in the product installation.