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:
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.