SPOOL exit 097 can be used in a client/server environment in conjunction with the product Dprint (Distributed Print Services) to control the number of Dprint jobs for file transfer. Using the exit enables each client to define a maximum number of jobs for file transfer. This causes the number of Dprint system tasks which control the Dprint jobs for which file transfer processing was initiated to be reduced. Furthermore, the exit can be used to prevent the file transfer resources on the client and server processors from being accessed exclusively by Dprint. This in turn may help solve the problem of print jobs being stuck for too long in an intermediate status (WFT or FT).
SPOOL background
If a Dprint job issued by a client has been accepted by a remote server, this job is in the SPOOL job queue of the server (status WFT, wait file transfer). In response to a request from the Dprint file transfer unit, SPOOL selects a job from the queue and forwards it to Dprint. The job selected is the one with the highest priority and whose original host (i.e. the client host which issued the job) is available and has free resources. If the Dprint file transfer unit has received the job, it informs the client host, which then initiates file transfer of the file to be printed and, if appropriate, of the file containing the resources necessary for printing. The Dprint file transfer unit requests jobs without interruption. As a result, all jobs accepted by the server which require file transfer are forwarded for file transfer immediately. If the number of jobs involved is extremely large and the server cannot cope with them all, performance problems will arise on the server side and it will be necessary to make exclusive use of the file transfer resources on the client side. In SPOOL, exit 097 is localized on the server side and comes into play whenever a job is selected for the Dprint file transfer unit.
The following information is transferred to the exit routine:R1 = A (EX096 parameter area)
The following fields are set in the parameter area:
E97HSTl@ | Address of a host table containing the names of the available hosts that are not yet saturated |
E97HST# | Number of entries in the host table |
E97HSTL | Length of an entry in the host table |
E97SVT@ | Address of the SPOOL vector table |
The return code is stored in the standard header of the parameter area.
E97EXNOK | X'00000001': an error occurred during processing. |
E97EXOK | X'00000000': the exit was executed without errors. |
The following fields can be set by the exit routine:
E97HOK# | Number of hosts left in the input host list * |
E97WFT# | Number of jobs with the status WFT for the hosts left in the input host list |
E97FT# | Number of jobs with the status FT for the hosts left in the input host list |
* input host list = input list from which certain entries have been removed, i.e. replaced by binary zeroes
DSECT
A DSECT/CSECT for the parameter area can be generated by means of the EX097 macro. “prefix” must not be longer than 3 characters.
EX097 D CLREXPL DSECT , File transfer balancing exit p/l E97EXBEG DS 0H FHDR MF=(C,E97),EQUATES=NO DS 0A E97FHE DS 0XL8 0 GENERAL PARAMETER AREA HEADER * E97IFID DS 0A 0 INTERFACE IDENTIFIER E97FCTU DS AL2 0 FUNCTION UNIT NUMBER * BIT 15 HEADER FLAG BIT, * MUST BE RESET UNTIL FURTHER NOTICE * BIT 14-12 UNUSED, MUST BE RESET * BIT 11-0 REAL FUNCTION UNIT NUMBER E97FCT DS AL1 2 FUNCTION NUMBER E97FCTV DS AL1 3 FUNCTION INTERFACE VERSION NUMBER * E97RET DS 0A 4 GENERAL RETURN CODE E97SRET DS 0AL2 4 SUB RETURN CODE E97SR2 DS AL1 4 SUB RETURN CODE 2 E97SR1 DS AL1 5 SUB RETURN CODE 1 E97MRET DS 0AL2 6 MAIN RETURN CODE E97MR2 DS AL1 6 MAIN RETURN CODE 2 E97MR1 DS AL1 7 MAIN RETURN CODE 1 E97FHL EQU 8 8 GENERAL OPERAND LIST HEADER LENGTH * * * EQUATES FOR EXIT RETURN INFORMATION IN &P.RET * E97EXNOK EQU 1 EXIT NOK E97EXOK EQU 0 EXIT OK E97UNUS DC XL4'00' **** UNUSED **** * E97HSTL@ DS A ACCESSIBLE HOST LIST E97SVT@ DS A SVT ADDRESS E97HST# DS H NBR OF ENTRIES IN THE LIST E97HSTL DS H LENGTH OF AN ENTRY IN THE LIST * E97HOK# DS H OUTPUT AREA = NBR OF CORRECT HST E97WFT# DS H TOTAL NBR OF JOB IN WFT E97FT# DS H TOTAL NBR OF JOB IN FT DS CL20 RESERVED FOR EXTENSION E97PLLEN EQU *-E97EXBEG LENGTH OF THE PARAMETER LIST