This section describes the NSPOOL utility, Com-plete's printout spooling facility for sites that run Natural under Com-plete.
This document covers the following topics:
CSPOOL is the Application Programming Interface (API) to Com-plete's spooling utility and provides NSPOOL functionality. The definition of the API, as well as customization information is given in section Customization.
NSPOOL is an example Natural application distributed on the Com-plete installation medium and can be modified to provide a site-specific printout spooling facility. NSPOOL permits the flexible management and distribution of output to any online printer in the TP network.
Many applications require output to be printed on special forms. A problem often arises when different applications require different forms to be mounted on the same printer at the same time. With NSPOOL, you can create printouts on virtual printers that are not currently active in the system and subsequently route the printouts through the TP network to the physical printer where the appropriate forms have been mounted.
In addition, NSPOOL can be used to provide relevant information pertaining to each printout in the system, thus providing a comprehensive overview of all queues for all printers. You can also display the contents of a printout before requesting a print operation.
NSPOOL also supports the operation of online printers using commands such as DISPLAY STATUS, HALT, and RESET. In addition, you can route any output from the online queues to the system spool by using the special destination SYSOUT.
NSPOOL is completely menu-driven and provides the capability of full screen data entry. An online HELP facility is also available to assist you.
NSPOOL provides a front-end written in Natural. This has implications both in the areas of security and customization.
With Natural Security, user access to printers, printer groups and functions on printouts can be controlled and maintained by the system administrator.
The Natural-based user interface allows site-specific adaptation to corporate standards, as well as the integration of site-specific functions and features.
Note:
The system programmer for your Com-plete installation also has the
option of restricting access to any particular NSPOOL/USPOOL function via the
UUSPL0 exit. Note that the exit takes priority over any definitions made in
Natural Security.
Under Natural, you must define NSPOOL as Library to Natural Security using the Library Maintenance facility. Specify the following user exit in the library definition:
USEREXIT: SPSE01-N
Additionally, enter SYSSEC as Steplib using the Additional Options (see the section Additonal Options in Library Maintenance in the Natural Security documentation). Note that you can only enter SYSSEC on entry level 1-8 (do not use entry level 9).
Using the User Maintenance facility in Natural Security, you must link each user to the Library NSPOOL. The link must be of type SL (special link), and you must specify user exit SPSE01-N in the special link.
The NSPOOL definitions immediately follow the Natural Security definitions. At the application level, printers can be organized into groups that can be referred to in user authorizations. User authorizations are made at the user level.
Once NSPOOL has been defined as library (NAT31 and above), the next screen allows you to define up to five printer groups for the application NSPOOL , each containing up to five printers. This table can be modified subsequently using the Modify Application/Library function of Natural Security:
--------------------------PRINTOUT-SPOOLING-SECURITY-------------------------- APPLICATION DATA Application: NSPOOL Prt-Group: ___ Printer: ________ ________ ________ ________ ________ Prt-Group: ___ Printer: ________ Prt-Group: ___ Printer: ________ ________ ________ ________ ________ ________ ________ ________ ________ Prt-Group: ___ Printer: ________ Prt-Group: ___ Printer: ________ ________ ________ ________ ________ ________ ________ ________ ________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- HELP --- END --- UPD --- --- --- --- ---- ---- ---- |
This table serves to make user authorization of printers more flexible: authorizing the user for one or more groups allows him/her to access the printers specified in the group(s).
Meaning of the input fields:
Prt-Group | Group identifier | |||
Printer | Printer name, or selection criteria to specify several printers: | |||
|
Press
Having
reached the "Application Data" screen via the special link, you can branch
immediately to the user authorization for NSPOOL with
or (the special link
must already exist between user and NSPOOL).
Once the special link between the user and NSPOOL has been defined, the next two screens allow you to authorize the user to perform functions on specific printers in the printer overview and on specific printouts in the printout queue.
These definitions can be modified subsequently by redisplaying the special link definitions for the user and pressing
to display the first Printout Spooling Security screen:--------------------------PRINTOUT-SPOOLING-SECURITY-------------------------- Application: NSPOOL User: MBE linked as: ADMINISTRATOR disallowed = D allowed = A Printernames Functions -------------- ------------ --------- A *_______ *__ ___ ___ ___ ___ _ ________ ___ ___ ___ ___ ___ _ ________ ___ ___ ___ ___ ___ _ ________ ___ ___ ___ ___ ___ Functions: * - all following Functions PO* - Printer Overview (PO, POS, PON) PP* - position Printout (PPT, PPB, PPA, PPR) OPH - halt Printer OP* - operate Printer (OPH, OPR, OPS, OPM) OPS - start Printer OPM - mount Form of Printer OPR - reset Printer Note: Cancel current Printout (OPC) and flush all Queue-Entries (OPF) are controlled via the Function 'purge Queue-Entries (MQP)'. Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- HELP --- END --- UPD --- --- MORE APPL ---- ---- ---- |
The top of this screen shows the application name (NSPOOL), the user ID for which the definition is valid, as well as the user type.
The input fields are explained in the table on the next page:
Disallowed/ Allowed | Specifies whether the user is or is not allowed to perform the | |||
function(s) specified in the Functions field for the specified Printer name. Possible options: | ||||
|
||||
Printername | Name of the printer or printer group for which the authorization is valid. You can either specify a printer name, a group name, or selection criteria as follows: | |||
|
||||
Functions | Functions for which authorization is granted or denied. Available functions are listed in the lower half of the screen. The first two characters of the functions identify the function type (e.g., PP=Position printer), the third character identifies the function as described in the section Printer Overview below). You can specify any function value listed (*, PO* PP*, OP*, OPM, OPH, OPS, OPR, note that wildcard and prefix selection is possible). Note that any function value also includes the PO function. Note also that the values in brackets in the list of functions are valid only as a reference if your site wishes to program its own frontend. |
Press
With you continue to the
List Queue function authorization table.
With
you can branch immediately to the printer group
definition screen described above.
The List Queue function authorization table is illustrated on the next page:
The List Queue function authorization table:
--------------------------PRINTOUT-SPOOLING-SECURITY-------------------------- Application: NSPOOL disallowed = D allowed = A Originator Listnames Functions -------------- ---------- --------- ---------------------------- A *_______ *_______ *__ ___ ___ ___ ___ ___ _ ________ ________ ___ ___ ___ ___ ___ ___ _ ________ ________ ___ ___ ___ ___ ___ ___ _ ________ ________ ___ ___ ___ ___ ___ ___ Functions: * - all following Functions LQ* - list Queue-Entries (LQ, LQS, LQN) DP* - display current Printout (DP, DPN) MQ* - modify Queue-Entries (MQU, MQC, MQM, MQP) MQU - update Queue-Entry MQC - copy Queue-Entry MQM - move Queue-Entry MQP - purge Queue-Entry Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- HELP --- END --- UPD --- UP --- APPL ---- ---- ---- |
The input fields are explained in the following table:
Field | Meaning | |||
---|---|---|---|---|
Disallowed/Allowed | Specifies whether the user is or is not allowed to perform the | |||
function(s) specified in the Functions field for the specified
Originator and Listname. Possible options: A: -- user is authorized. D: -- function is disallowed for the user. |
||||
Originator | User ID of the printout owner. You can either specify a user ID or selection criteria as follows: | |||
|
||||
Listname | Name of the printout for which the authorization is valid. You can either specify a list or printout name or selection criteria as follows: | |||
|
||||
Functions | Functions for which authorization is granted or denied. Possible function values are listed in the lower half of the screen. The first two characters of the functions identify the function type (e.g., MQ=Modify Queue entries), the third character identifies the function as described in the section List Queue below). You can specify any value listed on the left of the function list (wildcard or prefix selection is possible). Note that any function also includes the LQ function. Note that the values in brackets on the right are valid only as a reference if your site wishes to program its own front-end. |
Press
With you return to the
Printer Overview function authorization table.
With
you can branch immediately to the printer group
definition screen described above.
Note that if you fill one input field of an authorization table, you must also specify values in the other fields on the same line.
If you enter an authorization in the Printer Overview authorization table, you must also specify authorization parameters in the same line of the List Queue authorization table, otherwise default values take effect (see below). This means that if you enter an A in the authorization field, you must at least fill the function field of the Printer Overview table with PO* and the function field of the List Queue table with LQ*.
Conversely, if you delete an entry from the Printer Overview table, you must also delete the entry from the same line in the List Queue table.
NSPOOL can be used with or without Natural Security.
If NSPOOL runs under Natural Security, the user's logon user ID is searched in Natural Security. If the user ID is not defined, the request for NSPOOL is rejected.
If the user ID is defined to Natural Security, authorization is assigned as follows:
If the user ID has a Special Link to the application, but no security entry is made in the link, the user is assigned a default authorization. The default authorization consists of the following functions:
List all printers;
List all printouts belonging to the user ID;
Display any printout belonging to the user ID.
To reach the NSPOOL Main Menu, enter the following command:
*NSPOOL
The following screen appears:
------------------------------PRINTOUT-SPOOLING-MAIN-MENU------------------------ OPTION ===> Userid MBE Time 09:15:49 1 LQ - List Queue 2 PO - Printer Overview 3 SQ - Select Listings 4 SP - Select Printer END EXIT - Exit Spool HELP HELP - Display Help Information Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- HELP END |
The NSPOOL Main Menu provides access to the major spooling management functions in the middle of the screen.
You can execute the listed functions (LQ, PO, SQ, SP) by either entering the corresponding function number in the OPTION field. You can leave NSPOOL with the END command (
) or invoke the help system by pressing .The spooling management functions available from the NSPOOL Main Menu are summarized in the following table and discussed in the remainder of this section.
Option | Function | Explanation |
1/3 | LQ/SQ | Allows spooling display and manipulation specified by printout. |
2/4 | PO/SP | Allows spooling display and manipulation specified by printer. |
Note that the SQ and SP functions allow a more specific selection of output than the LQ and PO functions (see the sections List Queue and Printer Overview).
You can use the CLEAR key to return to terminate NSPOOL from any screen. The PF3 key returns you to the previous screen. Note that entering one of these keys on the Main Menu terminates NSPOOL.
Use PF1 to invoke the appropriate help display for the current screen. Type a question mark (?) in any input field to invoke a help window for the field.
To display and/or modify one or more printouts, select one of the List Queue functions from the NSPOOL Main Menu.
If you select the SQ function (number 3 on the main menu), a window opens in which you can enter selection criteria to restrict the output to display specific items:
--------------------------PRINTOUT-SPOOLING-MAIN-MENU------------------------- OPTION ===> 3 Userid MBE Time 10:41:07 1 +---------------------------+ 2 ! ! 3 ! To confine Display ! 4 ! of List-Queue, ! ! enter Listname: ________ ! END ! Format: ____ ! HELP ! Printer: ________ !ormation ! User: ________ ! ! Logical Driver: ________ ! ! Disposition: _ ! +---------------------------+ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- HELP END |
The items in the window correspond to some column headings in the output display (see next figure). The following input values are valid:
name | specific name of the item. |
* | select all items (default). |
prefix* | select all items with this prefix. |
prefix> | display all items, starting from item with this prefix. |
If you select the function LQ (number 1 from the main menu) or enter selection criteria in the prompt window invoked by the SQ function, the printout queue is displayed in the following format:
-----------------------------------LIST-QUEUE--------------------------------- COMMAND ===> FC Listname List-No Form Disp Lines Copy Pri Userid Log-Drv Printer A>______ ____ _ ________ ________ ________ * ***************************** top of list ***************************** . RKLLISTE 43 H 199 0 8 RKL DAEPRT15 . HARDCOPY 220 R 50 0 8 JWO DAEPRT53 . HARDCOPY 267 R 50 0 8 TSH DAEPRT53 . HARDCOPY 268 R 36 0 8 JWO DAEPRT53 . RMT 281 R 554 0 8 RMT STUPRT06 . HARDCOPY 283 R 26 0 8 JWO DAEPRT53 . HARDCOPY 289 R 58 0 8 WHE DUENN535 . HARDCOPY 377 R 50 0 8 FMU DAEPRT63 . HARDCOPY 379 R 54 0 8 FMU DAEPRT63 . XCOMV012 473 R 569 0 8 WSL HAMPRT01 * *************************** bottom of list **************************** Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- HELP MENU END DOWN DATE |
The above example display was generated by entering A> in theListname field of the window invoked by the SQ function (see previous figure).
You can modify the output by entering selection criteria in the input fields under some of the column headings as described under the headingSQabove.
Note that each line represents one printout.
If the number of printouts exceeds the screen size, press
to scroll down.Press
to display the date and time the printout(s) were created in place of the Log-Drv and Printer columns. redisplays the Log-Drv and Printer names.The meaning of the fields are explained in the table on the next page.
The following table describes the column headings on the NSPOOL List Queue screen.
Field | Meaning | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
FC | Specifies the Function Code. Type the value directly over the "." in the FC column. The following values are permitted: | |||||||||||
|
||||||||||||
Listname | Specifies name of the printout as specified by the originator. | |||||||||||
List-No | Specifies the Com-plete identification number assigned to the printout. | |||||||||||
Form | Specifies the printout form specification (is modifiable). | |||||||||||
Disp | Specifies the disposition of this printout: | |||||||||||
|
||||||||||||
Lines | Specifies the number of text lines for this printout. | |||||||||||
Copy | Specifies the number of additional copies requested for this printout (modifiable). | |||||||||||
Pri | Allows the priority of the printer to be specified. Note that the highest priority is 1. This field is modifiable to generate a list according to priority. | |||||||||||
Userid | Specifies the User ID of the printout originator. | |||||||||||
Either: | ||||||||||||
Log-Drv | Specifies the name of the logical output driver routine, which can perform additional output formatting during printing. This field is modifiable to generate a list according to logical output driver. | |||||||||||
Printer | Specifies the name of the destination for this printout (modifiable with the COPY or MOVE function). | |||||||||||
Or: | ||||||||||||
Date | Date the printout was created. | |||||||||||
Time | Time the printout was created. |
You can route printouts within the Com-plete TP spooling system to the operating spooling system by using the COPY and MOVE functions (see the preceding table) and defining SYSOUT as the new printer name. The output is then be transferred to the output class "A" as default. To select another output class, specify SYSOUT=x.
You can issue any of the following commands from the command line of the List Queue display screen:
Command | Meaning |
---|---|
MENU | Return to NSPOOL main menu. |
END | Return to previous screen. |
HELP | Display spooling help menu. |
PO | Call Printer Overview. |
LQ | Call List Queue. |
DOWN | Scroll forward. |
DATE | Switch display to DATE/TIME mode. |
DEST | Switch display to LOG-DRV/PRINTER mode. |
The available functions for displayed printouts are described in the above table in the explanation of the column headed FC.
To display and/or operate one or more printers, select the PO or SP function from the NSPOOL main menu (number 2 or 4 respectively).
If you select the SP function (number 4 on the main menu), a window opens in which you can enter selection criteria to restrict the output to display specific items:
The items in the window correspond to some column headings in the output display (see next figure). The following input values are valid:
name | name of the item (printer name, terminal ID or printer status). |
* | select all items (default, not valid for Tid-Nr.). |
prefix* | select all items with this prefix (not valid for Tid-Nr. ). |
prefix> | display all items, starting from item with this prefix (not valid for Tid-Nr. ). |
Note that the Printer-Name field and Tid-Nr. field are mutually exclusive.
If you select the function PO (number 2 from the main menu) or enter selection criteria in the prompt window invoked by the SP function, the printer overview is displayed in the following format:
--------------------------------PRINTER-OVERVIEW------------------------------ COMMAND ===> FC Printer Tid Dev-Type Status Form Q-Num ________ ____ ________ * ***************************** top of list ***************************** . SYSOUT 1 BATCH WAIT 0 . DUPPRT14 2 3288 L SIMLOGO 3 . DAEPTR75 3 3288 L SIMLOGO 2 . SAEPRT25 4 3288 L SIMLOGO 1 . DAERPT35 5 3288 L SIMLOGO 2 . DUGPR14 6 3288 L SIMLOGO 1 . HUGO 7 3288 L SIMLOGO 2 . LPRTSM02 8 3288 L SIMLOGO 1 . LPRTSM03 9 3288 L SIMLOGO 1 . LPRTSM04 10 3288 L SIMLOGO 1 . FF 11 3288 L SIMLOGO 2 . DAEPRT1 12 3288 L SIMLOGO 2 . MZCPRT 13 3288 L SIMLOGO 3 . XXX00001 14 3288 L SIMLOGO 1 . DAEPTR30 15 3288 L SIMLOGO 3 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- HELP MENU END TOP DOWN |
The above example display was obtained by invoking the SP function and leaving all fields blank in the prompt window (see previous figure).
You can modify the output by entering selection criteria in the input fields under some of the column headings as described under the heading SP above.
Note that each printer name can be associated with either a real or virtual printer.
If the list of printers exceeds the screen size, press
to scroll down. Press to redisplay the first output page.The meaning of the fields according to column heading is described in the table on the next page:
The following table describes the column headings on the NSPOOL Printer Overview screen.
You can issue any of the following commands from the command line of the Printer Overview display screen:
Command | Meaning |
---|---|
MENU | Return to NSPOOL main menu. |
END | Return to previous screen. |
HELP | Display spooling help menu. |
PO | Call Printer Overview. |
LQ | Call List Queue. |
DOWN | Scroll forward. |
TOP | Restart printer overview from the top. |
The available functions for displayed printers are described in the
above table in the explanation of the column headed FC.
The SHOW or QUEUE function enables you to display the contents of a specific printout at your terminal. You can request the display from either the List Queue screen (Function Code "S") or from the Printer Overview screen (Function Code "Q").
The following figure shows a sample of the output produced by selecting this function.
--------------------------------PRINTOUT-DISPLAY------------------------------ PRINTOUT: RKLLISTE COLUMNS 001 079 COMMAND ===> ********************************* top of list ******************************** 109:03:50 Current Object MTMENU0P in library SG--PROD 92-02-05 0010 * MTMENU0P SAG System Products Maintenance Tool Menu GW 88-02-06 0020 * 0030 DEFINE DATA 0040 GLOBAL USING MT00000G 0050 LOCAL USING +PFK-LDA 0060 LOCAL USING MTMENU0L 0070 LOCAL 1 #I (I2) 0080 END-DEFINE 0090 * 0100 * ---------------------------------------------------------------------- 0110 DEFINE SUBROUTINE INITIALIZATION 0120 * ---------------------------------------------------------------------- 0130 * 0140 ASSIGN #PF-VALUE (3) = 'END' 0150 ASSIGN #PF-VALUE (6) = 'SYS' Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- END DOWN LEFT RIGHT |
When viewing the printout, use
to display the next page (if there are more lines available). To shift the start column of the output to the left, use to shift to the right, use . The maximum line size of the output is 256 characters. Normally the columns 1 to 79 will be shown. Most of the printouts have 133 columns. In this case, a shift right shows column 55 to 133, and a shift left 1 to 79. If more columns available, it will be shifted to the next 79 lines to the right or left. To return to previous screen, press .You can issue any of the following commands from the command line of the printout display screen:
Command | Meaning |
---|---|
END | Return to previous screen. |
HELP | Display spooling help menu. |
PO | Call Printer Overview. |
LQ | Call List Queue. |
DOWN | Scroll forward. |
LEFT | Shift display to the left. |
RIGHT | Shift display to the right. |
NSPOOL functionality is provided by the module CSPOOL which is provided in source format (see the section Installation Considerations above).
CSPOOL references the CMSPCB macro. This macro generates the DSECT for the control block SPCB, as well as the DSECTs for the input and output lines (inp-arg, out-arg), depending on the selected function. For a description of the macro, see the CMSPCB copybook on the supplied source library.
The NSPOOL user interface is written in Natural. The Natural front-end programs use the data areas for communication with CSPOOL listed in the following table:
Source | Structure | Length | Remarks |
---|---|---|---|
SPWK01-A | #SPWK01A OP | 4 | For INIT/TERM |
SPCB01-A | #SPCB SPCB | 200 | |
SPQI01-A | #QI-WRKLINE inp-arg | 80 | |
SPQO01-A | #QO-WRKLINE out-arg | 200 | All subfunctions except DP and DPN |
SPQO02-A | #DPO-WRKARRAY out-arg | 256 | Subfunctions DP and DPN only |
* TITLE........: Common Work-area for Communication with SPCB01-N * NAME.........: SPWK01-A * TYPE.........: A * - -------------------------------- - ---- ----------------------- 1 #SPWK01A 2 #OP A 4 R 2 #OP /* REDEF. BEGIN : #OP 3 #OP-1 A 1 3 #OP-2 A 1 3 #OP-3 A 1 3 #OP-4 A 1
* TITLE........: Communication-area for corresponding via CSPOOL * NAME.........: SPCB01-A * TYPE.........: A * - -------------------------------- - ---- ----------------------- 1 #SPCB A 200 R 1 #SPCB /* REDEF. BEGIN : #SPCB 2 #SP-ID B 4 /* 'SPCB' 2 #SP-DATO B 4 /* INTERNAL 2 #SP-DATI B 4 /* INTERNAL 2 #SP-REQID B 4 2 #SP-REQIDC B 4 2 #SP-OP A 4 2 #SP-LREQ B 2 2 #SP-LLEN B 2 2 #SP-DISP B 2 /* DISPL. IN LINE 2 #SP-RETCD B 2 2 #SP-MSGNUM B 2 2 #SP-RLINS B 2 2 #SP-DYNW B 4 /* INTERNAL 2 #SP-DYNWL B 4 /* INTERNAL 2 FILL1 A 28 2 #SP-LNAMEL B 2 2 #SP-LNAME A 8 2 FILL2 A 8 2 #SP-FORML B 2 2 #SP-FORM A 8 2 FILL3 A 8 2 #SP-DESTL B 2 2 #SP-DEST A 8 2 FILL4 A 8 2 #SP-USERL B 2 2 #SP-USER A 8 2 FILL5 A 8 2 #SP-LDRVL B 2 2 #SP-LDRV A 8 2 FILL6 A 8 2 #SP-STATL B 2 2 #SP-STAT A 8 2 FILL7 A 28
* TITLE........: input Work-line * NAME.........: SPQI01-A * TYPE.........: A * - -------------------------------- - ---- --------------------------- 1 #QI-WRKLINE A 80 1 #QI-WRKLINE /* RED. BEGIN : #QI-WRKLINE 2 #LQI-ID B 4 2 #LQI-NAME A 8 2 #LQI-NUM B 2 2 #LQI-FORM A 4 2 #LQI-STAT A 1 2 #LQI-LINS B 2 2 #LQI-COPIES I 2 2 #LQI-PRIO I 2 2 #LQI-USER A 8 2 #LQI-LDRV A 8 2 #LQI-DEST A 8 2 #LQI-DATE A 8 2 #LQI-TIME A 8 2 #LQI-FILL1 A 15 R 1 #QI-WRKLINE /* RED. BEGIN : #QI-WRKLINE 2 #PQI-ID B 4 2 #PQI-NAME A 8 2 #PQI-TID B 2 2 #PQI-DTYPE A 8 2 #PQI-FORM A 4 2 #PQI-NUM B 2 2 #PQI-STAT A 8 2 #PQI-FILL1 A 44
* TITLE........: output Work-line * NAME.........: SPQO01-A * TYPE.........: A * - -------------------------------- - ---- --------------------------- 1 #QO-WRKLINE A 200 R 1 #QO-WRKLINE /* RED. BEGIN : #QI-WRKLINE 2 #LQO-ID B 4 2 #LQO-NAME A 8 2 #LQO-NUM B 2 2 #LQO-FORM A 4 2 #LQO-STAT A 1 2 #LQO-LINS B 2 2 #LQO-COPIES I 2 2 #LQO-PRIO I 2 2 #LQO-USER A 8 2 #LQO-LDRV A 8 2 #LQO-DEST A 8 2 #LQO-DATE A 8 2 #LQO-TIME A 8 2 #LQO-FILL1 A 135 R 1 #QO-WRKLINE /* RED. BEGIN : #QI-WRKLINE 2 #PQO-ID B 4 2 #PQO-NAME A 8 2 #PQO-TID B 2 2 #PQO-DTYPE A 8 2 #PQO-FORM A 4 2 #PQO-NUM B 2 2 #PQO-STAT A 8 2 #PQO-FILL1 A 164
* TITLE........: output Work-line only for display Printout * NAME.........: SPQO02-A * TYPE.........: A * - -------------------------------- - ---- --------------------------- 1 #DPO-WRKARRAY 2 #DPO-WRKLINE A 200 R 2 #DPO-WRKLINE /* RED. BEGIN: #DPO-WRKLINE 3 #DPO-ID B 4 3 #DPO-NAME A 8 3 #DPO-NUM B 2 3 #DPO-FORM A 4 3 #DPO-STAT A 1 3 #DPO-LINS B 2 3 #DPO-COPIES I 2 3 #DPO-PRIO I 2 3 #DPO-USER A 8 3 #DPO-LDRV A 8 3 #DPO-DEST A 8 3 #DPO-DATE A 8 3 #DPO-TIME A 8 3 #DPO-FILL1 A 135 2 #DPO-A56 A 56
The following table provides an overview of the functions and subfunctions supported by NSPOOL's Natural front-end.
Function | Subfunction | Meaning |
---|---|---|
PO | List printer overview | |
OP | Operate printer | |
PP | Modify printer | |
LQ | List printout queue | |
DP | Display printout | |
MP | Modify printout |
When customizing the NSPOOL front-end, the following points must be considered:
- Logic in general:
CALL 'CSPOOL' 'INIT' SPCB // CALL 'CSPOOL' SPCB inp-arg out-arg // CALL 'CSPOOL' 'TERM' SPCB- Initialization
The storage areas for the SPCB must be provided by the calling program. It is initialized by the following call:
CALL 'CSPOOL' 'INIT' SPCBThe reserved fields in the SPCB must not be modified by the user program. CSPOOL will keep addresses of internal work areas in those fields.
- Termination
To release the storage areas acquired by CSPOOL, a termination call is required:
CALL 'CSPOOL' 'TERM' SPCBFor more detailed information of CALL 'CSPOOL' ('INIT' / 'TERM') SPCB see frontend program SPCB01-N.
- Communication
The calling program sets the function code in the field #SP-OP in the #SPCB(SPCB-name in the frontend programs). The keyword table in the #SPCB (#SP-NAMEL #SP-NAME etc.) can be filled to specify search criterias. Call :
CALL 'CSPOOL' #SPCB #QI-WRKLINE #DPO-WRKARRAY (Names in frontend CALL 'CSPOOL' #SPCB #QI-WRKLINE #QO-WRKLINE programs)Note that inp-arg points to a copy of the out-arg of a previous (LQ/PO) request, if any subfunction is used. The field #SP-REQID in the #SPCB must also contain the value from (#LQO-ID/#PQO-ID).
Function | Meaning |
---|---|
PO | first entry |
POS | same entry again / position to referred entry |
PON | next in queue |
The following table lists the operands that must be filled in the used front-end program before calling CSPOOL. Which operands are relevant to which functions can be seen from the matrix following the table.
Data area | Fields in #SPCB | Format/length | Value |
---|---|---|---|
SPCB01-A | #SP-OP | A4 | Operation code (PO, POS, PON) |
SPCB01-A | #SP-LREQ | B2 | 1 |
SPCB01-A | #SP-REQID | B4 | TIB address |
SPCB01-A | #SP-DESTL | B2 | Length of destination name or TID number |
SPCB01-A | #SP-DEST | A8 | Destination name or TID number |
- | PO, POS | PO, POS | PO, POS, PON |
---|---|---|---|
#SP-OP | (1) in | (1) in | (1) in |
#SP-LREQ | (1) in | (1) in | (1) in |
#SP-REQID | (2) in | - | - |
#SP-DESTL | - | (3) in | (3) in |
#SP-DEST | - | (2) in | (2) in |
(1) | Required. |
(2) | Optional. |
(3) | If destination-name (#SP-DEST) is filled, the length of destination-name is required in #SP-DESTL. |
in | Input field |
For more detailed information, see the source of front-end program SPPQ01-S.
Operate Printer (OP) is a subfunction of the Printer Overview function and consists of the following:
OPM | mount printer format |
OPS | start printer |
OPR | reset printer |
OPH | halt printer |
The following table lists the operands that must be filled in the used front-end program before calling CSPOOL. Which operands are relevant to which functions can be seen from the matrix following the table.
Data area | Fields in #SPCB | Format/length | Value |
---|---|---|---|
SPCB01-A | #SP-OP | A4 | Operation code (OPM, OPS, OPR, OPH) |
SPCB01-A | #SP-LREQ | B2 | 1 |
SPCB01-A | #SP-REQID | B4 | TIB address (#PQD-ID) |
SPQI01-A | #QI-WRKLINE | A80 | Out-arg (#QO-WRKLINE) |
SPCI01-A | #PQI-FORM | A4 | Printer format |
OPM | OPS | OPR | OPN | |
---|---|---|---|---|
#SP-OP | (1) in | (1) in | (1) in | (1) in |
#SP-LREQ | (1) in | (1) in | (1) in | (1) in |
#SP-REQID | (1) in | (1) in | (1) in | (1) in |
#QI-WRKLINE | (1) in | (1) in | (1) in | (1) in |
#PQI-FORM | (1) in | - | - | - |
(1) | Required. |
in | Input field |
Subfunction OP is only possible after a successful function PO. For
more detailed information, see the source of front-end program SPOP01-P.
This subfunction branches to the function List Queue Overview. For execution, #SP-DESTL and #SP-DEST are filled. Subfunction Position Current Printout can then be used as described below.
Position Current Printout is a subfunction of List Queue Overview and consists of the following:
PPT | position current printout top |
PPB | position current printout bottom |
PPA | position current printout absolute |
PPR | position current printout relative |
The following table lists the operands that must be filled in the used front-end program before calling CSPOOL. Which operands are relevant to which functions can be seen from the matrix following the table.
Data area | Fields in #SPCB | Format/length | Value |
---|---|---|---|
SPCB01-A | #SP-OP | A4 | Operation code (PPT, PPB, PPA, PPR) |
SPCB01-A | #SP-LREQ | B2 | With PPA and PPR, number of pages requested. Otherwise, 1 |
SPCB01-A | #SP-REQID | B4 | TIB address (#PQD-ID) |
SPQI01-A | #QI-WRKLINE | A80 | Out-arg (#QO-WRKLINE) |
PPT | PPB | PPA | PPR | |
---|---|---|---|---|
#SP-OP | (1) in | (1) in | (1) in | (1) in |
#SP-LREQ | (1) in | (1) in | (1) in | (1) in |
#SP-REQID | (1) in | (1) in | (1) in | (1) in |
#QI-WRKLINE | (1) in | (1) in | (1) in | (1) in |
(1) | Required. |
in | Input field |
Subfunction PP is only possible after a successful PO and LQ request. For more detailed information, see source of front-end program SPPP01-S.
The following two subfunctions are simulated.
OPC | cancel current printout |
OPF | flush all queue entries |
With these subfunctions, the function List Queue Overview is branched to. For execution, #SP-DESTL and #SP-DEST are filled. Subfunction Modify Queue entry purge (MQP) can then be used as described below.
Function | Meaning |
---|---|
LQ | first entry |
LQS | same entry again / position to referred entry |
LQN | next in queue |
The following table lists the operands that must be filled in the used front-end program before calling CSPOOL. Which operands are relevant to which functions can be seen from the matrix following the table.
Data area | Fields in #SPCB | Format/length | Value |
---|---|---|---|
SPCB01-A | #SP-OP | A4 | Operation code (LQ, LQS, LQN) |
SPCB01-A | #SP-LREQ | B2 | 1 |
SPCB01-A | #SP-REQID | B4 | MCQ address |
SPCB01-A | #SP-LNAMEL | B2 | Length of printout name |
SPCB01-A | #SP-LNAME | A8 | Printout name |
SPCB01-A | #SP-FORML | B2 | Length of format name |
SPCB01-A | #SP-FORM | A8 | Format name |
SPCB01-A | #SP-DESTL | B2 | Length of destination name |
SPCB01-A | #SP-DEST | A8 | Destination name |
SPCB01-A | #SP-USERL | B2 | Length of user ID |
SPCB01-A | #SP-USER | A8 | User ID |
SPCB01-A | #SP-LDRVL | B2 | Length of logical driver name |
SPCB01-A | #SP-LDRV | A8 | Logical driver name |
SPCB01-A | #SP-STATL | B2 | Length of status name |
SPCB01-A | #SP-STAT | A8 | Status name |
LQ, LQS | LQ, LQS, LQN | LQ, LQS, LQN | |
---|---|---|---|
#SP-OP | (1) in | (1) in | (1) in |
#SP-LREQ | (1) in | (1) in | (1) in |
#SP-REQID | (2) in | - | - |
#SP-LNAMEL | - | (3) in | - |
#SP-LNAMEL | - | (2) in | - |
#SP-FORML | - | (3) in | - |
#SP-FORM | - | (2) in | - |
#SP-DESTL | - | (5) in | - |
#SP-DEST | - | (2) in | - |
#SP-USERL | - | (6) in | - |
#SP-USER | - | (2) in | - |
#SP-LDRVL | - | (7) in | - |
#SP-LDRV | - | (2) in | - |
#SP-STATL | - | (8) in | - |
#SP-STAT | - | (2) in | - |
in | Input field |
(1) | Required. |
(2) | Optional. |
(3) | If printout-name (#SP-LNAME) is filled, the length of the printout name is required in #SP-LNAMEL. |
(4) | If format-name (#SP-FORM) is filled, the length of the format name is required in #SP-FORML. |
(5) | If destination-name (#SP-DEST) is filled, the length of the destination name is required in #SP-DESTL. |
(6) | If user-id (#SP-USER) is filled, the length of the user ID is required in #SP-USERL. |
(7) | If logical driver-name (#SP-LDRV) is filled, the length of the logical driver-name is required in #SP-LDRVL. |
(8) | If status-name (#SP-STAT) is filled, the length of the status name is required in #SP-STATL. |
For more detailed information, see source of frontend program SPLQ01-N.
Printout Display is a subfunction of List Queue Overview and consists of the following:
DP | first entry |
DPN | next line |
The following table lists the operands that must be filled in the used front-end program before calling CSPOOL. Which operands are relevant to which functions can be seen from the matrix following the table.
Data area | Fields in #SPCB | Format/length | Value |
---|---|---|---|
SPCB01-A | #SP-OP | A4 | Operation code (DP, DPN) |
SPCB01-A | #SP-LREQ | B2 | 1 |
SPCB01-A | #SP-REQID | B4 | MCQ address (#LQO-ID) |
SPCB01-A | #SP-LLEN | B2 | Length of output line (max. 256) |
SPQI01-A | #QI-WRKLINE | A80 | Out-arg (#QO-WRKLINE) |
- | DP | DPN |
---|---|---|
#SP-OP | (1) in | (1) in |
#SP-LREQ | (1) in | (1) in |
#SP-REQID | (1) in | - |
#SP-LLEN | (1) in | - |
#QI-WRKLINE | (1) in | - |
in | Input field |
(1) | Required. |
Subfunction DP is only possible after a successful LQ request. For more detailed information, see source of front-end program SPDP01-P.
Modify Queue Entry is a subfunction of List Queue Overview and consists of the following:
MQU | modify queue entry update |
MQP | purge queue entry |
MQC | copy queue entry |
MQM | move queue entry |
The following table lists the operands that must be filled in the used front-end program before calling CSPOOL. Which operands are relevant to which functions can be seen from the matrix following the table.
Data area | Fields in #SPCB | Format/length | Value |
---|---|---|---|
SPCB01-A | #SP-OP | A4 | Operation code (MQU, MQP, MQC, MQM) |
SPCB01-A | #SP-LREQ | B2 | 1 |
SPCB01-A | #SP-REQID | B4 | MCQ address (#LQO-ID) |
SPQI01-A | #QI-WRKLINE | A80 | Out-arg (#QO-WRKLINE) |
SPQI01-A | #LQI-FORM | A4 | Printout format |
SPQI01-A | #LQI-STAT | A1 | Printout status |
SPQI01-A | #LQI-COPIES | B2 | Number of printout copies |
SPQI01-A | #LQI-PRIO | B2 | Printout priority |
SPQI01-A | #LQI-LDRV | A8 | Printout logical driver |
SPQI01-A | #LQI-DEST | A8 | Printout destination |
- | MQU | MQP | MQC | MQM |
---|---|---|---|---|
#SP-OP | (1) in | (1) in | (1) in | (1) in |
#SP-LREQ | (1) in | (1) in | (1) in | (1) in |
#SP-REQID | (1) in | (1) in | (1) in | (1) in |
#QI-WRKLINE | (1) in | (1) in | (1) in | (1) in |
#LQI-FORM | (2) in | - | (2) in | (2) in |
#LQI-STAT | (2) in | - | (2) in | (2) in |
#LQI-COPIES | (2) in | - | (2) in | (2) in |
#LQI-PRIO | (2) in | - | (2) in | (2) in |
#LQI-LDRV | (2) in | - | (2) in | (2) in |
#LQI-DEST | - | - | (1) in | (1) in |
(1) | Required. |
(2) | Optional. |
in | Input field. |
Subfunction MQ is only possible after a successful LQ request. For more detailed information, see source of front-end program SPMQ01-P.