ULMSBTCH - Batch Output User Exit

ULMSBTCH is a user-written routine used to examine and/or modify the parameters which the Com-plete batch spool output routines subsequently use to generate a DYNALLOC/SEGMENT call during batch printout spooling.

ULMSBTCH is dynamically loaded during Com-plete initialization. The module is invoked with service routine status (that is, it is in Com-plete's protect key). This means that if an abend occurs in the exit, all of Com-plete terminates abnormally.

This document covers the following topics:


How to use ULMSBTCH

On entry to ULMSBTCH, a set of parameters is received in the form of a fullword pointed to by register 1. On return from the exit, the response in register 15 will be examined and processed.

ULMSBTCH conventions

Registers on entry

Register 1: Address of parameter area
Register 13: 18-fullword save area

Registers at return

Register 15: Response code

All other registers must be unchanged.

Parameters

ULSTNAME DS CL8 Printout name (X)
ULSTNUM DS AL2 Printout number  
ULSTCOPY DS AL2 Printout copies (X)
ULSTFORM DS CL4 Printout form (X)
ULSTHEAD DS XL1 Nr. of header pages to be generated (0=none, 2=default) (X)
ULSTCLAS DS CL1 Output Class (X)
ULSTOTID DS AL2 Original TID number  
ULSTNODE DS CL8 Output node (X)
ULSTUSER DS CL8 Userid (X)
ULSTOUSR DS CL8 Originating userid  
ULSTFLG1 DS XL1 Flag byte (X)
ULSTMNOS EQU X'80' When on, no separators will be printed (that is, no skip to channel will be issued.  
ULSTHDR1     First header line (X)
ULSTHDR2     Second header line (X)
ULSTHDR3     Third header line (X)

Note that macro CMULST now generates the appropriate DSECT. This must be used to remain compatible with future releases of Com-plete.

(X) indicates that the field can be modified by the user exit.

The header generated by the Batch output facility consists of three blocked lines of output:

ULSTOUSR
ULSTNAME
ULSTOUSR

These fields may be modified to suit your installation requirements.

Return codes

0 Com-plete issues the DYNALLOC/SEGMENT using the parameters specified.
4 Com-plete assumes that the user exit has issued a valid DYNALLOC/SEGMENT call. The user exit is responsible for issuing and validating the DYNALLOC/SEGMENT call.
8 Com-plete rejects the printout request.

Using AFP printers

You can use ULMSBTCH to setup an output descriptor for, e.g., AFP printers and tell Com-plete to use this output descriptor at the DYNALLOC macro for SYSOUT. To achieve this, proceed as follows:

  1. Create the output descriptor using the IBM macro OUTADD. Specify PAGEDEF and FORMDEF based on the contents of ULSTFORM using your own relation table and/or algorithm.

  2. Put the name of the output descriptor into ULSTNAME and switch on the x'40' bit (ULSTMOUD) in ULSTFLG1 to indicate there is an output descriptor.

  3. ULMSBTCH itself is responsible for maintaining information about the output descriptors it already added, issuing OUTDEL macros when/if necessary, etc.