HPlogo Native Mode Spooler Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 2 Spooler and Spool File Management Tasks

Managing the spooler

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

The user who has access to the system console, typically the system operator and occasionally the system manager, can control virtually every aspect of spooling with the SPOOLER command. This includes starting, stopping, suspending, and resuming any spooler process, and releasing a suspended spool file so that another can be printed instead. The SPOOLER command may be entered only at the console unless it has been allowed to other users via the ALLOW or ASSOCIATE commands.

To use the SPOOLER command, you must always specify device(s) whose spooler you want to direct, and at least one other parameter that tells MPE/iX what to do. The general form of the SPOOLER command is shown below. The remainder of this section explains the various tasks you can do with the SPOOLER command and provides examples for you. For a detailed explanation of the SPOOLER command and its parameters, see chapter 4.

   SPOOLER [DEV=] {ldev

                   devclass

                   devname}

   {;SHOW

    ;OPENQ [;SHOW]

    ;SHUTQ [;SHOW]

    ;START [;OPENQ

            ;SHUTQ] [;SHOW]

    ;STOP [;FINISH  [;OPENQ  

           ;NOW]     ;SHUTQ] [;SHOW]

                       

    ;SUSPEND [[;FINISH [;NOKEEP

               ;NOW]    ;KEEP] 

              [;OFFSET= [+

                         -] page] 

              [;OPENQ

               ;SHUTQ][;SHOW] ]

    ;RESUME [;OFFSET= [+

                       -] page][;OPENQ

                                ;SHUTQ]  [;SHOW]

    ;RELEASE [;OFFSET= [+

                        -] page][;OPENQ

                                 ;SHUTQ]  [;SHOW] }

The design of the native mode (NM) spooler prevents full backward compatibility with the compatibility mode (CM) spooler commands. For instance, SUSPENDSPOOL and SPOOLER ...;SUSPEND without the ;FINISH option causes the spooler process to retain ownership of the spool file that it is currently processing. Such differences will be noted as appropriate throughout this chapter, and they are further explained in Appendix B.

Starting a spooler

To create and activate a new spooler process on a spoolable device, enter:

   SPOOLER DEV=6;START

Or, because DEV= is optional, you could also enter:

   SPOOLER 6;START

Stopping a spooler

To stop a spooler process, enter:

   SPOOLER 6;STOP

This command also closes the spooling queues for logical device 6. To stop the spooler process and to leave the spooling queues open for logical device 6, enter:

   SPOOLER 6;OPENQ;STOP

Suspending a spooler

To suspend a spooler process, use the SPOOLER command with the SUSPEND parameter or use the SUSPENDSPOOL command. When you issue either of these commands, the spooler process retains ownership of the spool file that it is currently processing, but pauses the output. While the spooler is suspended, users may continue to create spool files, but no printing takes place. The printer(s) whose spooler process(es) have been suspended will remain idle until you command the spooler(s) to resume. When you issue the SPOOLER...;RESUME command (with no offset specified), the printer resumes printing exactly where it left off

For example, to suspend spooling on all printers belonging to device class LP, you would enter:

   SPOOLER LP ;SUSPEND

There are many options to the SPOOLER;SUSPEND and the SUSPENDSPOOL commands that allow you to control the interruption of printing and determine the spooler's behavior when printing resumes. These options are explained next.

Finish the report first

To suspend spooling but allow a spool file that is currently being printed to finish printing, enter:

   SPOOLER 6;SUSPEND;FINISH

Discontinue printing immediately

To immediately suspend spooling without allowing the currently printing spool file to finish, or to keep the file for reprinting at a later time, enter:

   SPOOLER 6;SUSPEND;NOW

Because ;NOW is the default option, it may be omitted.

Discontinue printing and keep the spool file

You can suspend spooling but allow the spooled device to retain ownership of the file it is currently printing. This way, the spool file will resume printing (exactly where it left off or at another page that you specify) when the spooler resumes. To do so, you would enter:

   SPOOLER 6;SUSPEND;NOW;KEEP

The ;KEEP parameter is the default and can be used only when ;NOW is specified or taken as the default. As a result, you could achieve the same result by entering:

   SPOOLER 6;SUSPEND

Release the spool file

You can suspend spooling and direct the printer to release the currently printing spool file. If a spool file is released, a different spool file may begin printing when spooling is resumed. Or, the released spool file could be printed by another spooler process.

To release a spool file, you use the NOKEEP parameter.;NOKEEP may only be used when ;NOW is specified or taken by default. For example:

   SPOOLER 6;SUSPEND;NOW;NOKEEP

Specifying where to resume

When you are printing to CIPER protocol devices and HP 2680 and HP 2688 page printers, you can specify on what page to resume printing. For these devices, a page is one physical sheet. (Pages are not defined for other devices, and the results of using the ;OFFSET parameter are unpredictable for them.) To instruct the spooler where to begin printing, you use the ;OFFSET parameter. If you don't specify the ;OFFSET parameter, printing resumes at the page where it stopped. This is the default.

;OFFSET is valid only in the following cases:

  • when the spooler is actively printing a file and ;SUSPEND is used

  • when the spooler is releasing a file (with the ;RELEASE option) that it retained during a previous suspend

  • when the spooler is resuming printing of a file (with the ;RESUME option) it retained during a previous suspend

For example, to suspend spooling and to position backward three pages from the page that is being printed, enter:

   SPOOLER 6;SUSPEND;OFFSET=-3

To suspend spooling and to position forward five pages in the current spool file, enter:

   SPOOLER 6;SUSPEND;OFFSET=+5

To suspend spooling and to position seven pages from the beginning of the spool file, you would enter the command below. In this case, the absence of a + or - sign indicates an absolute offset from the beginning of the spool file.

   SPOOLER 6;SUSPEND;OFFSET=7

To be sure that a spool file begins printing at its beginning, enter:

   SPOOLER 6;SUSPEND;OFFSET=1

Suspending a network printer spooler

When using network printers, avoid using the following commands to suspend the spooler in mid-file:

  • SPOOLER ...; STOP

  • SPOOLER ...; SUSPEND; OFFSET=anything

  • SPOOLER ...; RESUME; OFFSET=anything

  • SPOOLER ...; SUSPEND; NOKEEP

  • SPOOLER ...; RELEASE

Many interfaces drop a network connection if the printer is ready to receive data but no data is being sent within a specific time period. The period is configurable at the printer or in the printer's TFTP file (specified in the bootptab entry), but many users simply use the factory default, which is 90 seconds.

The timer only runs when the printer is available but the host is not sending data, as is the case during a mid-file suspension. The timer does not run when the printer is unable to print, i.e., it has been taken offline, or places itself offline due to a paper out or toner low condition.

Resuming a spooler

Use the NMS command SPOOLER with the parameter RESUME or the command RESUMESPOOL to resume processing a spool file. Both SPOOLER...;RESUME and RESUMESPOOL begin printing where the printer left off, provided that the following conditions are met:

  • You suspended the spooler with either SUSPENDSPOOL (without the ;FINISH option) or SPOOLER ldev ;SUSPEND (without the ;FINISH option but with the ;KEEP option and with no specified offset).

  • You did not enter SPOOLER ldev ;RELEASE while the spooler was suspended. (The ;RELEASE parameter directs a suspended spooler to release a spool file that it is currently retaining.)

  • You did not specify an offset as part of the RESUME command.

Now suppose that logical device 6 is owned by a spooler process. Enter:

   SPOOLER 6 ;SUSPEND

Suppose that the spooler had just transmitted line 20 of page 10 and suppose that the conditions above hold. To continue spooling at line 21 of page 10 as if the suspension never took place, enter:

   SPOOLER 6 ;RESUME

If you do not suspend this way, the spooler prints a trailer and prints a header when it resumes. If the spooler releases a file, any specified offset is honored by the next spooler which prints the file. If you do not specify an offset, the next spooler starts at the beginning of the page at which the previous output was suspended.

NOTE: If you use the following RESUMESPOOL commands to interrupt printing of a spool file on a printer that does not support Page Level Recovery (PLR), the spooler displays a warning on your $STDLIST indicating it is initiating a recovery sequence. (Refer to appendix C for details on PLR.)
  • RESUMESPOOL ...; BEGINNING

  • RESUMESPOOL ...; BACK any PAGES

  • RESUMESPOOL ...; FORWARD any PAGES

Releasing a suspended spool file

If the ;SUSPEND parameter is used with the ;KEEP option or the ;KEEP option is taken by default (that is, neither ;KEEP nor ;NOKEEP is specified), the spooler process retains the spool file which was printing when the command was entered. This means that the currently printing spool file is the first spool file to print when spooling is resumed. You may use the ;RELEASE parameter to release a retained spool file. A released spool file is closed and the spool file prints based on its output priority relative to other spool files. The released spool file may also be printed by another spooler process.

To release a retained spool file, enter:

   SPOOLER 6;RELEASE

You may use the ;OFFSET option to specify the spool file location where printing begins when the spool file finally begins to print. To release a spool file and to specify that it is to begin printing 10 pages back from the current page position, enter:

   SPOOLER 6;RELEASE;OFFSET=-10

To release a spool file but ensure that it resumes printing at its beginning, enter:

   SPOOLER 6;RELEASE;OFFSET=1

You may also position the spool file forward from the current page position or forward from the beginning of the spool file. For information on how to do this, see the previous section on suspending spool files. The ;OFFSET parameter works in exactly the same way with each of the ;SUSPEND and ;RELEASE parameters. When you use the ;RESUME parameter, ;OFFSET works in the same way except for the case of a spooler that did not retain its file. ;OFFSET is not valid with ;START or ;STOP.

Displaying spooler process status

The SPOOLER command ;SHOW parameter displays the status of the spooling process. To issue this command, enter:

   SPOOLER 6;SHOW

If a device class is specified, status is displayed for all spoolable devices in the class.

You may use ;SHOW with any combination of other SPOOLER command parameters. For example:

   SPOOLER 6;SUSPEND;OFFSET=1;OPENQ;SHOW

;SHOW produces a listing similar to:

   LDEV   DEV     SPSTATE     QSTATE   OWNERSHIP   SPOOLID

    6   0000006  *SUSPEND     OPENED   OUT SPOOLER  #O237

   19   0000019  *ACTIVE      OPENED   OUT SPOOLER  #O264

The asterisk (*) indicates that the device is in a pending state on the way to the requested state. For example, suppose that you issue a SPOOLER command to suspend spooling. It is possible for the ;SHOW option of the command to finish processing before the spooler is fully suspended. In this case, an asterisk precedes the state of the spooler, shown under SPSTATE, to indicate that it is being changed.

Opening the spool queues

The OPENQ command opens the spooling queue for each device and makes it possible for users to create spool files. It does not enable you to print spool files. The OPENQ command may be entered only from the system console unless allowed to other users with the ALLOW or ASSOCIATE commands. Before spool files can print you must start the spooler.

The general form of the OPENQ command is:

   OPENQ      {ldev [;SHOW]

               devclass [;SHOW]

               devname [;SHOW]

               @ }

For example, to open the spooling queue for all devices in class LP, enter:

   OPENQ LP

To see information about the state of the queues and device(s) for which you are opening spooling queues, enter:

   OPENQ LP;SHOW

To open all spool queues that were shut because the system ran out of disk space, a file limit was encountered on the HPSPOOL account or its groups, or the SHUTQ @ command was entered, enter:

   OPENQ @

Shutting the spool queues

The SHUTQ command prohibits anyone from creating new spool files but has no effect on spool files which have already been opened. It does not prevent spool files from printing. To do that, you must stop or suspend the spooler. The SHUTQ command may be entered only from the system console unless allowed to other users with the ALLOW or ASSOCIATE commands.

The general form of the SHUTQ command is:

   SHUTQ       {ldev [;SHOW]

                devclass [;SHOW]

                devname [;SHOW]

                @ }

For example, to close the spooling queue(s) for all devices in class LP, enter:

   SHUTQ LP

To see information about the state of the queues and device(s) for which you are closing spooling queues, enter:

   SHUTQ LP;SHOW

To shut all open spool queues on your system, enter:

   SHUTQ @

Controlling printer access

The OUTFENCE command does not affect the spooler process directly but you may use it to control access to a spooled printer. The OUTFENCE command enables you to assign a fence or numerical barrier to one or more printers. An output spool file does not print unless its output priority exceeds the outfence. The OUTFENCE command may be entered only from the system console unless allowed to other users with the ALLOW or ASSOCIATE commands.

The general form of this command is:

OUTFENCE outpri [;LDEV=ldev

                 ;DEV={ldev

                       devclass

                       devname}]

The outpri parameter can be any value from 1 to 14. An outfence of 14 prevents any spool file from printing. The ;DEV parameter may be a logical device number, device class, or device name and is optional. The ;LDEV parameter refers only to a printer's logical device number. It also is optional. If ;LDEV and ;DEV are omitted, the command applies to all spoolable printers.

For example, to prevent anything from printing on all devices which are members of the device class LP, enter:

   OUTFENCE 14;DEV=LP

To set the outfence to 8 for LDEV 6, enter:

   OUTFENCE 8;DEV=6

Controlling the printing of headers and trailers

You may use the HEADON and HEADOFF commands to print or supress printing of a paper header and trailer page between each report. Paper headers may make it easier to physically separate and distribute printed material

To produce a printed header and trailer on a specific logical device, enter:

   HEADON 6

To eliminate the header and trailer, enter:

   HEADOFF 6

Either command takes effect when the next spool file is started.

Reprinting spool files

By default, spool files are deleted after the last copy is printed. The ;SPSAVE parameter causes a print file to be saved in the OUT group of the HPSPOOL account after the last copy of it has been printed. This is useful because it enables you to print spool files repeatedly (using the SPOOLF command) without having to rerun the producing application each time. If you do this, it may be desirable to copy the saved spool file to your own group and account to save space in the OUT group of the HPSPOOL account that is a shared system resource. You may then use the ;PRINT option of the SPOOLF command to print the file whenever you wish. To use this parameter simply add ;SPSAVE onto any file equation for printed output. For example:

   FILE SPPRNT;SPSAVE

You may not use ;SPSAVE and ;PRIVATE together.

To save a job's $STDLIST output spool file in the OUT.HPSPOOL group after it has printed, add the ;SPSAVE parameter to the JOB command as follows:

   JOB MYJOB;SPSAVE

Printing an unlinked spool file

The ;PRINT option of the SPOOLF command copies a linked or an unlinked output spool file to a linked output spool file that has an entry in the spool file directory. Once the file is linked to the spool file directory, it will be printed according to its output priority.

For example, to use the SPOOLF command to print the file MYSPOOL, you would enter:

   :SPOOLF MYSPOOL;PRINT;DEV=LP

Printing on special forms

The ;FORMID parameter, in conjunction with the ;FORMS parameter, may be used to specify a unique special form for printed output. The ;FORMID parameter saves the operator from interacting with the console when multiple spool files are printed with the same special forms.

Unless you modify them with the FORMSALIGN command, the following rules apply to the ;FORMID and ;FORMS= parameters:

  • If there is a specified FORMID different from the FORMID of the previous file that the spooler processed and if the FORMS=formsmessage is specified, then the forms message is displayed on the console or the $STDLIST of a user who has been associated to a spooled device with the ASSOCIATE command. The spooler waits for a reply to verify that the correct form is mounted and aligned before printing the spool file. The forms message is saved to use the next time there is no specified FORMID. The FORMID is also saved.

  • If there is a specified FORMID different from the FORMID of the previous file that the spooler processed, if there is no FORMS=formsmessage, and if the spooler device has a nonstandard form from the previous file, then the standard forms message is displayed on the console or the $STDLIST of the associated user. The spooler waits for a reply to verify that standard forms have been mounted. The standard forms message is saved to use the next time there is no specified FORMID. The FORMID is also saved.

  • If the FORMID is the same as the last time, no message appears on the console or on the $STDLIST of the associated user. The same form as the last time is used.

  • If there is no FORMID specified and the FORMS=formsmessage is the same as the last time (this includes no FORMS=formsmessage), then no message appears on the console or on the $STDLIST of the associated user. The same form as last time is used.

  • If no FORMID is specified and a different FORMS=formsmessage is specified, then the new message is displayed on the console or on the $STDLIST of the associated user. The forms message is saved. The spooler waits for a reply to verify that the correct nonstandard form is mounted.

  • If neither FORMID nor FORMS=formsmessage is specified and there was a FORMS=formsmessage specified the last time (but no FORMID), then the standard forms message is displayed on the console or on the $STDLIST of the associated user. The spooler waits for a reply to verify that the standard form is mounted. The standard forms message is saved.

The form name specified with the ;FORMID parameter is used for printing and for management of spool files. You can group spool files having the same form name by using the ;FORMID keyword of the ;SELEQ parameter with the LISTSPF and SPOOLF commands, which are described later in this chapter.

The FORMS=formsmessage must end with a period or you get an error message. The FORMID must be no longer than eight characters and must begin with a letter. An example of FORMS= (notice the period) and FORMID follows:

   FILE SPPRNT;FORMS=MOUNT TAX FORM.;FORMID=TAX1040

In this case, the FORMID is TAX1040. The LISTSPF command with the ;DETAIL parameter displays TAX1040 along with the spool file. Suppose that you are not the console user nor do you have SM, OP, or AM capability. To display the output spool files in your user.account that have the attribute TAX1040 and to display the name TAX1040 with the spool files, enter:

   LISTSPF O@;SELEQ=[FORMID=TAX1040];DETAIL

Other issues to be aware of include these:

  • FORMIDs have no meaning for hot printers. No part of the hot printer path interprets FORMIDs, only the forms message associated with them.

  • A specific FORMID is intended for a unique forms message. Use of more than one forms message with the same FORMID causes unpredictable behavior. For example, using one FORMID and two forms messages where one forms message is no message is not recommended. The spooler does not flag this as an error.

  • You can use the ;SELEQ= parameter with the LISTSPF and SPOOLF commands to select spool files with no FORMID by specifying a null string. First set up a file equation for a file with no FORMID:

       FILE NOFORMID;DEV=LP,2
    

    After creating the output file, use ;SELEQ= in the following way:

       ;SELEQ=[FORMID=""]
    

    For example, to display the spool file with no FORMID, enter:

       LISTSPF;SELEQ=[FORMID=""]
    

    Because you have qualified the LISTSPF command to display only those spool files with no FORMID, the display on the screen is as follows:

       SPOOLID   JOBNUM  FILEDES  PRI   COPIES  DEV    STATE   RSPFN    OWNER
    
    
    
       #01       S12345  NOFORMID   2        1  LP     READY            USER.ACCOUNT1
    

    ;SELEQ=[FORMID=""] works equally well with the SPOOLF command.

Feedback to webmaster