Creating a Spool File [ Native Mode Spooler Reference Manual ] MPE/iX 5.0 Documentation
Native Mode Spooler Reference Manual
Creating a Spool File
Most spool files are created by application programs which write reports
to spooled printers. You can, however, create spool files from standard
MPE/iX files with certain commands.
Copying a spool file to a printer
To create a spool file, copy a file to a spooled printer with the FCOPY
utility. For example:
FILE SPPRNT;DEV=LP;CCTL
FCOPY FROM=MYFILE;TO=*SPPRNT
NOTE In these examples, MYFILE is used for illustrative purposes only.
You would use the name of a file from your environment. Also, you
may add a group name or group and account name to qualify the file.
The PRINT command
Another way to create a spool file is to use the PRINT command with a
standard MPE/iX file. For example:
FILE SPPRNT;DEV=LP;CCTL
PRINT MYFILE;OUT=*SPPRNT
Building and printing a spool file
The BUILD command has a ;SPOOL parameter that is used to build unlinked
output spool files. Here is a sample of this command:
BUILD MYSPOOL;REC=-132,1,F,ASCII;DISC=3000,1,1;SPOOL
To put data into this spool file from a file called MYFILE enter:
FILE MYSPOOL,OLD
PRINT MYFILE,*MYSPOOL
Then, to use the SPOOLF command to print the file enter:
SPOOLF MYSPOOL;PRINT;DEV=LP
File codes and the BUILD command.
The ;CODE= parameter of the BUILD command accepts three file codes for
spool files. They are:
Integer Mnemonic Meaning
1515 INSP input spool file
1516 OUTSP output spool file
1517 CHKSP output spool file checkpoint file
NOTE A mnemonic in this case is a word-like combination of characters
that is suggestive of and represents a file code.
To specify a file code with the BUILD command, simply add the ;CODE=
parameter as follows:
BUILD MYSPOOL;CODE=1516
NOTE Specifying one of these file code parameters without the ;SPOOL
option does not make the file a spool file; therefore, you cannot
use the SPOOLF ;PRINT command on it. The file code parameter
merely sets the specified value into the file code location in the
file label. Remember, the ;SPOOL option only creates unlinked
output spool files.
For more information on the SPOOLF, BUILD and PRINT commands refer to
chapter 4.
Linked and unlinked spool files
A spool file that has been created with the ;SPOOL parameter of the BUILD
command is an unlinked file. This means that it has no corresponding
entry in the spool file directory. An unlinked spool file does not print
nor can it be seen with the LISTSPF command.
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. Refer to "SPOOLF" . A linked spool file prints
according to its output priority.
For more information on output priorities refer to the OUTFENCE and
SPOOLF commands in this chapter.
All output spool files created by application programs writing to spooled
devices are initially linked to the spool file directory.
Spool-related parameters on the FILE command
FILE commands or equations, are frequently used by print programs and
utilities that produce printed output. Four features of the FILE command
are specifically relevant to the native mode spooler: ;SPOOL, ;PRIVATE,
;SPSAVE, and ;FORMID and ;FORMS=
SPOOL.
This parameter specifies 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. (See above
discussion on linked and unlinked spool files and printing spool files.)
To use the ;SPOOL parameter simply add it to a file equation as follows:
FILE SPPRNT;SPOOL
PRIVATE.
The ;PRIVATE option generates a spool file 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:
FILE SPPRNT;PRIVATE
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:
FILE SPPRNT;SPOOL;PRIVATE
See chapter 5 for more information about private spool files.
SPSAVE.
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.
FORMID and 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 (Chapter 4), 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
FORMIDS and forms messages.
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.
Spool-related parameters on the JOB command
Two parameters, ;PRIVATE and ;SPSAVE, of the JOB command are specifically
relevant to the native mode spooler.
PRIVATE.
Refer to the description of a private spool file in the previous section
or in chapter 5.
To generate a private output spool file, add ;PRIVATE to the JOB command
as follows:
JOB MYJOB;PRIVATE
SPSAVE.
You might want to save your output spool file in order to print it
without having to rerun the job. To save your 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
You may not use ;SPSAVE and ;PRIVATE together.
MPE/iX 5.0 Documentation