|
|
Native Mode Spooler Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 1 Getting StartedWorking with spool files |
|
To the typical MPE/iX user, the Native Mode Spooler makes it appear as though he or she has exclusive access to the printer. That is, whenever users need to print something, or if they stream a job that produces a printed report, they simply issue a command without checking to see if the printer is busy or not and the spooler handles the rest. The way that the spooler manages shared access to a single printer is by creating a spool file that contains, among other information, the text of the report. The spooler adds this file to the spool queue for the printer (if the queue is open) and then sends the spool file to the printer when it reaches the top of the queue. Once the report is printed, the spool file is deleted from the queue (unless you explicitly choose otherwise), which means that a list of spool files typically is equivalent to a list of files waiting to be printed. This section explains the types of spool files and shows how MPE/iX users can work with their own spool files. (The spooler allows members of the system adminstration staff, depending upon their assigned capabilities, to manipulate all individual spool files in the queue and the spool queue itself. This chapter does not explain spool management.) In the next section, you'll learn the different ways to view spool files. With the native mode spooler (NMS), the file system creates spool files as ordinary, permanent disk files. There are two kinds of spool files it creates, input spool files, which are always linked to the spool file directory, and output spool files, which may or may not be linked to the spool file directory. The NMS also creates a third kind of disk file, checkpoint files, which are used to assist in the printing of output spool files. When the spooler generates these files, it automatically places them into the reserved account HPSPOOL. If you are the user who created the spool files, you may view and access them as if they were in your own group and account. Three numeric codes designate the files as input spool files, output spool files, and checkpoint files. They are: 1515 input spool files 1516 output spool files 1517 checkpoint files For more information, see the discussion of the BUILD command later in this chapter. The spooler creates input spool files when you submit jobs or enter data either via command line input (i.e. issuing the JOB or DATA commands) or from a spooled input device. The spooler copies a streamed or input spooled job to an input spool file and MPE schedules the job. When the job logs on, the spool file becomes the job's input ($STDIN). See the JOB command in the MPE/iX Commands Reference Manual Volumes 1 and 2 (32650-60115) for more information. Similarly, data are placed into an input spool file and can be accessed by the user.account specified in the DATA command. See the DATA command in the MPE/iX Commands Reference Manual Volumes 1 and 2 (32650-60115) for more information. The system creates input spool files in the IN group of the reserved account HPSPOOL. Input spool file names have the format Innnn.IN.HPSPOOL where nnnn is a number, for example, I235.IN.HPSPOOL. Because input spool files are always linked to the spooling subsystem, IN.HPSPOOL is the only place in the system containing input spool files. These files remain in IN.HPSPOOL until a job or process uses them or you delete them with one of the following methods:
Output spool files normally reside in the OUT group of the HPSPOOL account and, unless you explicitly delete them, remain there until they print. You may use the ;SPSAVE parameter with the FILE, JOB, and SPOOLF ...;ALTER commands to leave your spool file in OUT.HPSPOOL after all copies of the file print. Then you may copy the saved spool file into your own group and account so that you do not have to run the generating application again. You may not use the ;SPSAVE parameter to save a private output spool file. Output spool file names have the format Onnnn.OUT.HPSPOOL where nnnn is a number, for example, O46.OUT.HPSPOOL. The OUT.HPSPOOL group contains only linked output spool files. If you copy an output spool file from OUT.HPSPOOL to your account, the copy is not linked into the spooling subsystem. If you issue the SPOOLF command with the parameters PRINT and DEV on the copy, another copy is made in OUT.HPSPOOL and this copy is linked. You can also create unlinked output spool files by using the BUILD or FILE commands with the ;SPOOL parameter or with the HPFOPEN intrinsic. Checkpoint files are companions to output spool files that help the spooler recover from device problems such as power failure and paper jams. Checkpoint files also help a suspended spooler resume producing output. There is one checkpoint file per output spool file for each device that prints the spool file. The output spooler creates the checkpoint file at the time it begins to print an output spool file, not before. The checkpoint file is automatically deleted when you or the spooler delete the output spool file from the HPSPOOL account or after a spool file that is saved with the ;SPSAVE parameter has its last copy printed. The naming convention used for a checkpoint file is either of the following:
Where Cnnnnn is the numerical value of the spoolid of the corresponding spool file preceded by a "C", and Dmmmmmmm is the logical device number (with leading zeros as required), preceded by a "D". Refer to the "File naming convention" section in appendix D for more information on naming a checkpoint file. Checkpoint files are created for every output spool file, but they are only used on CIPER protocol printers. All input spool files are automatically created private. By default, an output spool file is nonprivate, but you may choose to make it private for greater data security. Private output spool files differ from regular nonprivate spool files in the following ways:
You may access nonprivate spool files according to the following guidelines:
If you have read access to nonprivate spool files, you may store and restore them with the STORE and RESTORE commands, respectively. If you have write access, you may purge nonprivate spool files using STORE with the ;PURGE option. There are many different ways to create spool files. This section provides a quick overview of some of them. To have the spooler create a spool file, you direct output to a device whose spool queue is open. For example, when you issue the command to send a file to the printer from within a text editing program, the spooler creates an output spool file containing, among other information, the data you want to print. Try this simple example to see:
A second way to generate a spool file is to submit a batch job that includes, as one of the list of command it executes, a command for sending a report to the printer. You use the STREAM command, followed by the name of the job file, to submit a job. For example:
Try these steps to create and stream a simple job that sends a few lines of text output to a printer.
A third way to create a spool file is to copy a file to a spooled printer with the FCOPY utility. For example:
A fourth way to create a spool file is to use the PRINT command with a standard MPE/iX file. For example:
To create an unlinked spool file, you use the SPOOL parameter of the BUILD command. For example, to create the spool file MYSPOOL, you would enter:
To enter data into this spool file from a file called MYFILE enter:
The ;CODE= parameter of the BUILD command accepts three file codes for spool files. The file code parameter sets a specified value in the file label, which determines the type of spool file that the BUILD command will create. Specifying one of these file code parameters without also specifying the ;SPOOL option does not make the file a spool file. You can enter one of these file codes in addition to specifying the SPOOL option. The file codes you can enter and their corresponding mnemonic (in this case is a word-like combination of characters that is suggestive of and represents a file code) are listed below. Integer Mnemonic Meaning 1515 INSP input spool file 1516 OUTSP output spool file 1517 CHKSP output spool file checkpoint file For example, to specify a output spool file code with the BUILD command, simply add the ;CODE= parameter as follows:
You can use the SPOOL parameter of the FILE command to create an output spool file that is not linked to the spool file directory and, therefore, will not be printed. A spool file created in this way may be printed at a later date. To use the ;SPOOL parameter simply add it to a file equation as follows:
The ;PRIVATE option of the FILE command also generates a spool file,but one that may be accessed in privileged mode only. Private spool files may not be saved or copied. They may only be purged, printed, or (within limits) altered using the SPOOLF command. The PURGE or COPY commands may not be used on private files. To create a private spool file, simply add ;PRIVATE onto a file equation for a spool file. For example:
If the file is not already a spool file, then add both the ;SPOOL and ;PRIVATE parameters to make the file a private spool file, as follows:
Once the printer finishes printing your file, the output spool file is deleted. You can direct the spooler to save the output spool file to the group and account OUT.HPSPOOL instead of deleting it by adding the SPSAVE option to the JOB command at the beginning of your job file. To make these changes, do the following:
The 1 in the JOB option OUTCLASS=LP,1 specifies that the output spool file has an output priority of 1. This effectively delays the printing of the file until you raise the file's input priority to a value greater than the outfence. (The outfence determines the minimum priority a spool file must have to be eligible for printing.) The spooler places input and output spool files in a special group and account reserved for that purpose, and not in your own group and account. Input spool files are stored in IN.HPSPOOL and output spool files are stored in OUT.HPSPOOL. You cannot copy input spool files; they are reserved for the exclusive use of the spooler process. If you want to save an output spool file into your account, you may do so by copying this file from the group OUT.HPSPOOL with the COPY or FCOPY commands. Spool files copied in this way are unlinked from the spooling subsystem, although the original spool file in OUT.HPSPOOL remains linked. For example, to copy the output spool file O1121 from OUT.HPSPOOL to the report file in your account, you would enter:
You can use the COPY command to copy a spool file to a hierarchical file directory structure. You cannot use the RENAME command to move the file. Refer to MPE/iX Commands Reference Manual Volumes 1 and 2 (32650-60115) for more information on copying files. You can change an output spool file's characteristics by using the SPOOLF command. For example, to change the priority of a spool file, do the following:
In the next series of steps, you will use the same commands to increase the number of print copies and place the file in a deferred state.
You can use the SPOOLF command to delete one or more of your output spool files before they are printed. To do so:
|
|