Operation Notes |
 |
Spool files under the native mode spooler are permanent disk files. They are created implicitly by sending data to a spooled output device. Spool files can be created explicitly by using the HPFOPEN intrinsic or the BUILD command.
A spool file created by HPFOPEN with the link option or the linked device option resides in the HPSPOOL account. It has an entry in the separately maintained spool file directory and is linked into the spool file queues. This is called a "linked" spool file and it is known to the spooling processes.
A spool file created by the BUILD command or by the HPFOPEN intrinsic without the link option can reside in any user directory. It does not have an entry in the spool file directory and is not linked into the spool file queues. A spool file created in such a manner is described as "unlinked" and is not known to the spooling processes.
To clarify this further, A linked spool file must reside in the HPSPOOL account, but a spool file that resides in the HPSPOOL account is not
necessarily linked.
To link a spool file for printing, the spool file must first be copied to the HPSPOOL account and linked into the spool file directory. AIFSPFLINK provides both the copying and the linking as described.
AIFSPFLINK works for both a linked or an unlinked spool file, but if a spool file is already linked, it is not necessary to call AIFSPFLINK to get extra copies of the spool file printed.
One other application of AIFSPFLINK is that a user may save a copy of a spool file from the HPSPOOL account in his own directory. This can be achieved by the COPY command. The user copy of the spool file
is not linked. Later on, when this spool file is to be printed, the user can call AIFSPFLINK to copy and link the spool file to the HPSPOOL account. However, the spool file queue must be open for the target device before a copy of the spool file can be created in the OUT group of the HPSPOOL account.
Certain attributes of a spool file can be altered while linking the spool file by calling this routine. If the target device information exists in the file label extension, then that device will be used as the
default. The target_device parameter may be specified to override the existing target device. If there is no target device in the file label extension, target_device must be specified when calling AIFSPFLINK or an error results.
If a lockword exists for the file specified in source_spf, it must be specified in the parameter spf_lockword. Other attributes that can be changed for the spool files are priority, copies, spsave and defer.