HP 3000 Manuals

The Spoolfile Interface Facility (SPIFF) (contd) [ Native Mode Spooler Reference Manual ] MPE/iX 5.0 Documentation


Native Mode Spooler Reference Manual

The Spoolfile Interface Facility (SPIFF) (contd) 

SPIFF commands 

The SPIFF commands outlined in "SPIFF commands summary"  are described
in detail in the sections that follow. 

ALTER 

Alters the priority, number of copies, target device, or any combination
of these attributes, of one spool file or of many spool files.

Syntax 

          {spoolfileid [,spoolfileid [,...]]}
> A[LTER] {*                                }
          {username[.acctname]              }
          {seleq                            }

;{option[,{option}[,...]]}

where {option} is

{      {ldev    }  }
{D[EV]={devclass}  }
{      {devname }  }
{                  }
{P[RI]=priority    }
{C[OPIES]=numcopies}
Parameters 

spoolfileid   An existing spoolid to which the user has access.  To be
              taken as a spoolid (instead of a username), this parameter
              must begin with a number or with a pound sign (#).  The
              full syntax is [#O]nnnnn, where the n's represent digits.
              If the # is used, the O must also be used.  If the O is
              used without the #, the parameter is interpreted as a user
              name and will probably cause an error.

*             The current spool file--one that has been explicitly TEXTed
              in, or that is current because it is the last spool file
              processed by the COPY, APPEND, or BROWSE command.  If this
              form is used without a current spool file, an error message
              is displayed.

username      The name of a user on the system.  Full MPE wildcarding is
              supported.  The SPIFF user must have access to files
              generated by username.  Refer to "Security" .

acctname      The name of an account on the system.  Full MPE wildcarding
              is supported.  Default:  the logon account is assumed.  The
              SPIFF user must have access to files generated by users in
              acctname.  Refer to "Security" .

seleq         A native mode spooler selection equation specifying the set
              of spool files to be altered.  The equation must be
              enclosed in brackets, as it is in the following example:

                   ALTER [OWNER=MANAGER.SYS AND PRI<3];DEV=LP,PRI=8

              This alters all spool files created by the user MANAGER.SYS
              that have priority less than 3.

              If you choose this (seleq) form of file set selection,
              SPIFF inserts an OWNER=!HPUSER.!HPACCOUNT in its internal
              selection equation, unless you explicitly include your own
              OWNER definition.  This prevents users with SM, OP, or AM
              capabilities from accidentally accessing files that they
              did not create.

              Consult one of the following documents for more information
              about selection equation syntax and semantics:

                 *   MPE/iX Commands Reference Manual Volumes 1 and 2 
                     (32650-90003 and 32650-90364)

                 *   MPE/iX online help facility

ldev          A logical device number of a printer whose spooling queues
              are open.

devclass      A device class containing at least one printer whose
              spooling queues are open.

devname       The device name of a printer whose spooling queues are
              open.

              __________________________________________________________ 

              NOTE  It is not possible to have a device class name and a
                    device name that are the same.  If you enter an
                    alphanumeric character string, the command searches
                    the device class list first, and then the device name
                    list.

              __________________________________________________________ 

priority      A number between 1 and 13.

numcopies     A number between 1 and 65535.

Operation Notes 

The ALTER command (abbreviated A) changes the priority, number of copies,
device specification, or any combination of these, of one spool file or a
group of spool files.  Spool files may be designated explicitly in a list
(for example, #O12345, #O67890), by user and/or account, (for example,
MYUSER.MYACCT) or by selection equation.

SPIFF executes the ALTER command by transforming its parameters into a
form suitable for the MPE/iX SPOOLF command, then executing the SPOOLF
command.  Any SPOOLF execution errors are displayed as such.

The display following the ALTER command can be interrupted by entering
CTRLY. Any subsequent display is discarded.  The ALTER command itself
cannot be interrupted.

For any private spool file, only the PRI may be changed.  A user with SM
capability may also change the target DEV . The COPIES may not be
changed.

Options may appear in any order.  If a particular option appears more
than once, the last such option is used.  For example, ALTER
15928;p=2,p=3--the resulting priority is 3.

Example 

Assume that spoolid #O6490 exists and is accessible to you:

     ALTER 6490;c=3,p=4

     SPOOLID    JOBNUM   FILEDES  PRI COPIES DEV      STATE  RSPFN OWNER

     #O6490     S35      MYFILE     4      3 LP       READY        MYUSER.MYACCT
     >

Suppose that spoolid #O6491 has been marked private:

     ALTER 6491;p=4,c=2
     SPOOLF (O6491);ALTER;SHOW;COPIES=2;PRI=4
     CANNOT ALTER COPIES ON SPOOLFILE "#O6491". (CIWARN 4660)
     SHOW

     SPOOLID    JOBNUM   FILEDES  PRI COPIES DEV      STATE  RSPFN OWNER

     #O6490     S35      MYFILE     4      3 LP       READY        MYUSER.MYACCT
     #O6491     S35      PRVAT      2      1 LP       READY    P   MYUSER.MYACCT

     INPUT SPOOL FILES            OUTPUT SPOOL FILES
     ACTIVE   = 0;                CREATE   = 0;              READY    = 2;
     OPEN     = 0;                DEFER    = 0;              SELECTED = 0;
     READY    = 0;                DELPND   = 0;              SPSAVE   = 0;
                                  PRINT    = 0;              XFER     = 0;
                                  PROBLM   = 0;

     TOTAL IN FILES   = 0;        TOTAL OUT FILES   = 2;
           IN SECTORS = 0;              OUT SECTORS = 2128;

     OUTFENCE = 6;

Note that the illegal attempt to modify the number of copies prevented
the legal change of priority.  Note, too, that the SPOOLF command
resulting from the SPIFF ALTER command is also displayed.

APPEND 

Appends all or part of one or many spool files to a new spool file.  The
first spool file processed by the command creates the new spool file.
Subsequent spool files are appended to it.

Syntax 

> AP[PEND]

[[spoolfileid [,spoolfileid [,...]];]                  ]
[[* ;                               ][range[,filename]]]
[[username[.acctname];              ]                  ]
[[seleq ;                           ]                  ]
[END                                                   ]
where range is

[[recnumber[{+} offset]] [, count                ]]
[[         [{-}       ]] [/ recnumber[{+} offset]]]
[[                     ] [           [{-}       ]]]
[[* [{+} offset]       ] [                       ]]
[[  [{-}       ]       ] [/ * [{+} offset]       ]]
[[                     ] [    [{-}       ]       ]]
[[FIRST [{+} offset]   ] [                       ]]
[[      [{-}       ]   ] [/ FIRST [{+} offset]   ]]
[[                     ] [        [{-}       ]   ]]
[[LAST [{+} offset]    ] [                       ]]
[[     [{-}       ]    ] [/ LAST [{+} offset]    ]]
[                        [       [{-}       ]    ]]
[                                                 ]
[ALL                                              ]

Semantics 

Range expressions are limited to:

(first line number of file) <= expression <= (last line number of file).

Lines are numbered from 0 to N-1.  No error is generated for exceeding
these limits; SPIFF simply limits the expression.  For example, FIRST-2
evaluates to FIRST.

The following situations, although syntactically valid, are semantic
errors and are flagged as such:

   *   Using APPEND END when you have not opened an append filename.

   *   Specifying a first position range expression which evaluates to a
       greater line number than that of the second position range
       expression.

       Note that the expression, not its components, is tested.  A range
       of LAST/FIRST is always an error, but a range of LAST-20/FIRST+40
       is valid for any file consisting of no more than 61 lines
       (numbered 0 to 60).

   *   Omitting the source file syntax (spoolfileid, username, etc.), or
       specifying * as the source file, unless you have a current spool
       file.  A current spool file is one that has been explicitly TEXTed
       in, or is current because it is the last spool file processed by
       the COPY, APPEND or BROWSE command.

       If you have no current spool file, the source file specification
       (something other than *) is a required parameter.

Parameters 

spoolfileid   An existing spoolid to which the user has access.  To be
              taken as a spoolid (instead of a username), this parameter
              must begin with a number or with a pound sign (#).  The
              full syntax is [#O]nnnnn, where the n's represent digits.
              If the # is used, the O must also be used.  If the O is
              used without the #, the parameter is interpreted as a
              username and will probably cause an error.

username      The name of a user on the system.  This parameter, when
              used with the optional acctname, specifies the set of spool
              files to append.  Full MPE wildcarding is supported.  The
              SPIFF user must have access to files generated by username.
              Refer to "Security" .

acctname      The name of an account on the system.  This parameter, when
              used with username, specifies the set of spool files to
              append.  Full MPE wildcarding is supported.  Default:  the
              logon account is assumed.  The SPIFF user must have access
              to files generated by users in acctname.  Refer to
              "Security" .

seleq         A native mode spooler selection equation specifying the set
              of spool files to append.  The selection equation must be
              enclosed in brackets as in the following example which
              appends all spool files created by the user MANAGER.SYS
              with priority less than 3:

                   APPEND [OWNER=MANAGER.SYS AND PRI<3];ALL

              If you choose this (seleq) form of file set selection,
              SPIFF inserts an OWNER=!HPUSER.!HPACCOUNT in its internal
              selection equation, unless you explicitly include your own
              OWNER definition.  This prevents users with SM, OP, or AM
              capabilities from accidentally acessing files that they did
              not create.

              Consult one of the following documents for more information
              about selection equation syntax and semantics:

                 *   MPE/iX Commands Reference Manual Volumes 1 and 2 
                     (32650-90003 and 32650-90364)

                 *   MPE/iX online help facility

              Refer to the discussion of selection equations for the
              LISTSPF or SPOOLF MPE/iX command.

range         The range of lines of the spool file(s) to append.  By
              default, only the current record is appended.  Any line
              number specified that is outside the range of lines in the
              spool file will be handled as though FIRST or LAST was
              specified, as appropriate.  If your range consists of two
              expressions, the first expression must evaluate to a number
              no larger than than the second.

filename      The name of the target file, the file being appended to.
              It must be a spooled file.  You may specify filename with
              or without the backreferencing *, as long as the
              corresponding file equation already exists.

              If you omit this parameter, SPIFF tries to open the target
              file using the formal file designator of the first source
              spool file.

              The controlling file equation may have been canceled with a
              RESET command since the source spool file was created.  In
              this case, the attributes of the source spool file are
              given to the target spool file.

              Similarly, the file equation may have been redefined.  In
              that case, the file equation will prevail, because it
              overrides any HPFOPEN parameters specified by SPIFF.

ALL           Specifies that all of the records in the spool file(s)
              should be appended.  No other range element is allowed if
              this keyword is used.

FIRST         The first record in the spool file.

LAST          The last record in the spool file.

*                *   When used as a source file specification, *
                     specifies the current spool file.

                 *   When used as a range element, * specifies the
                     current record in the spool file.

recnumber     An absolute record or line number of text in the spool
              file.  Records are numbered starting with 0.

offset        A relative number of records before (-) or after (+) the
              specified record.

count         A numeric value, the number of lines to be appended,
              including the starting record.

END           Closes the current append file, terminating append access
              to it.

Operation Notes 

The APPEND command (abbreviated AP) appends all or a range of one or more
spool files to a new spooled devicefile (filename in the syntax above).
Spool files may be designated explicitly in a list (#O12345, #O67890), by
user and/or account (MYUSER.MYACCT), or by selection equation.

If you have a current spool file you may omit the source file
specification and SPIFF will take its source from the current spool file.
It is an error to omit the source file specification if you do not have a
current spool file.

The last source file processed remains as the current spool file,
regardless of any earlier current spool file.  For example, if you have
TEXTed in #O18450, but you then APPEND #O18451,#O18452;ALL, the current
spool file at the end of the command is #O18452.

The target file must be a local spooled device file.  An ordinary disc
file, a spooled device file on a remote node, or a non-spooled device
file (such as a tape drive) is not supported and, if specified, results
in an error.

The FCOPY subsystem can be used to create such a target file, but this is
not recommended:  except for the remotely spooled device file, doing so
deletes information from the target file, which is usually vital to
printing data properly.  Once this information has been deleted, it
cannot be recovered.

Examples of such information include the following:

   *   The control field for HP2680 environment file records.
       Without this information, the data in the records appears as
       unintelligible random characters.

   *   Prespace/postspace information.  Without it, all records are
       printed in postspace mode.

   *   Information that indicates whether or not the first byte of data
       in each record should be treated as carriage control.

A remotely spooled device file--one that exists on another system
node--is not supported and, if specified, results in an empty spool file
on the remote system and an error message.  SPIFF cannot delete this
empty spool file on the remote system.

Once a target device file has been opened, any spool files specified in
this command or subsequent APPEND commands are appended to it until an
APPEND END command is entered.  At that time, the device file is closed
and enters the READY state.  The next APPEND command will open a new
target device file.


NOTE If you use the seleq or username.acctname form, and if this resolves to more than one file, the order in which these files are appended to the target file is determined by the underlying LISTSPF command generated by SPIFF. In general, for a given device or class queue, the order of source spool files is determined first by output priority, then by the time they first entered the READY state. To ensure a specific order in the target file, enter an explicit list of spoolid's. These will be processed in left-to-right order.
Entering CtrlY during command execution stops the execution after the current record is transferred. The current target file remains open for possible use by subsequent APPEND commands. The current source file remains open as the current spool file. When you interrupt an append operation with CtrlY, the identity of the last record transferred is usually not known. Therefore, you should regenerate the file or use it to create a new append file with the desired subset of records. Examples EXAMPLES OF range: */*+20 *-20/* ALL FIRST/LAST */LAST LAST-100/LAST FIRST,20 100/200 5 EXAMPLES OF COMMANDS: FILE MYLP;DEV=LP FILE MYPP;DEV=PP;ENV=MYENV APPEND #O6490;ALL Creates a new spool file with attributes identical to #O6490. The new spool file remains open until closed with APPEND END. APPEND [OWNER=MYUSER.MYACCT];ALL,*MYPP Creates a new spool file targeted to device class PP using environment file MYENV. Spool files belonging to MYUSER.MYACCT are appended to this environment information. APPEND 101,102,103;ALL,*MYPP This is the same as the previous example, except that an explicit list of spoolfileid's has been used. APPEND [OWNER=SOMEBODY.ELSE];ALL,*MYLP The specified fileset contains no accessible spoolfiles. (SPERR 82) The user does not have SM or OP capability or is not an AM user in the ELSE account. APPEND 10000;ALL One or more of the specified spoolfile(s) is invalid. (SPERR 44) Spool file #O10000 does not exist or is inaccessible to this user. Assume that MYLP is a terminal for a session and that spoolfileid 101 was sent to it. > :FILE MYLP=$STDLIST > APPEND 101;ALL The target of a COPY or APPEND command must be a local spooled devicefile (SPERR 124) > Redefining the attributes of MYLP makes it impossible to copy spoolfileid #O101 to MYLP. >APPEND ALL, *MYPP You have no current TEXT file (SPERR 81) No source spool file is specified nor was one opened in an earlier command. > T #O357 > FIND @ "header: Start APPEND at next line" 100 This is the end of the header: Start APPEND at next line >APPEND */LAST, *MYPP After LISTing or FINDing a line, the current record pointer is advanced to the next record. Here the APPEND will start with record number 101. BROWSE Invokes the HPBROWSE utility, if it is available. Syntax > B[ROWSE] [spoolfileid] [* ] Semantics The spoolfileid parameter is optional only if you have previously TEXTed in a spool file; otherwise it is a required parameter. Parameters spoolfileid An existing spoolid to which the user has access. This specifies the source file to be browsed. To be interpreted as a spoolid, this parameter must begin with a number or with a pound sign (#). The full syntax is [#O]nnnnn, where the n's represent digits. If the # is used, the O must also be used. If the O is used without the #, it is considered an invalid spool file id. * The current spool file--one that has been explicitly TEXTed in, or that is current because it is the last spool file processed by the COPY, APPEND, or BROWSE command. If this form is used without a current spool file, an error message is displayed. Operation Notes The BROWSE command invokes the HPBROWSE utility to provide a more powerful interface for viewing and pattern searching than is available in SPIFF. If spoolfileid is specified, any current spool file is closed and the specified spool file becomes the TEXT file. If * is specified, or if no spoolfileid is specified (the two forms are equivalent), the current spool file is used. The spool file being browsed is left open as the current spool file when the utility terminates.
NOTE Consult your HPBROWSE documentation for more information. Because HPBROWSE is not included with the Fundamental Operating System (FOS), it may not exist on your system. In this case, an error is generated and the command fails, although any spool file TEXTed in remains as the current spool file.
COPY Copies all or part of one or many spool files to a new spool file. Syntax [spoolfileid [,spoolfileid [,...]];] > C[OPY] [* ; ] [username[.acctname]; ] [seleq ; ] [range[,filename]] where range is [[recnumber[{+} offset]] [, count ]] [[ [{-} ]] [/ recnumber[{+} offset]]] [[ ] [ [{-} ]]] [[* [{+} offset] ] [ ]] [[ [{-} ] ] [/ * [{+} offset] ]] [[ ] [ [{-} ] ]] [[FIRST [{+} offset] ] [ ]] [[ [{-} ] ] [/ FIRST [{+} offset] ]] [[ ] [ [{-} ] ]] [[LAST [{+} offset] ] [ ]] [[ [{-} ] ] [/ LAST [{+} offset] ]] [ [ [{-} ] ]] [ ] [ALL ] Semantics Range expressions are limited to: (first line number of file) <= expression <= (last line number of file). Lines are numbered from 0 to N-1. No error is generated for exceeding these limits; SPIFF simply limits the expression. For example, FIRST-2 evaluates to FIRST. The following situations, although syntactically valid, are semantic errors and are flagged as such: * Specifying a first position range expression that evaluates to a greater line number than that of the second position range expression. The expression, not its components, is tested. A range of LAST/FIRST is always an error, but a range of LAST-20/FIRST+40 is valid for any file consisting of no more than 61 lines (numbered 0 to 60). * Omitting the source file syntax (spoolfileid, username, etc.) unless you have previously TEXTed in a spool file. If you have no currently TEXTed spool file, the source file specification is a required parameter. Parameters spoolfileid An existing spoolid to which the user has access. This specifies the source of the data to be copied. To be taken as a spoolid (instead of a username), this parameter must begin with a number or with a pound sign (#). The full syntax is [#O]nnnnn, where the n's represent digits. If the # is used, the O must also be used. If the O is used without the #, the parameter is interpreted as a username and will probably cause an error. username The name of a user on the system. This parameter, when used with the optional acctname, specifies the set of spool files to copy. Full MPE wildcarding is supported. The SPIFF user must have access to files generated by username. Refer to "Security" . acctname The name of an account on the system. This parameter, when used with the username, specifies the set of spool files to copy. If omitted, the logon account is assumed. Full MPE wildcarding is supported. The SPIFF user must have access to files generated by users in acctname. Refer to "Security" . seleq A native mode spooler selection equation specifying the set of spool files to copy. The selection equation must be enclosed in brackets as in the following example that copies all spool files created by the user MANAGER.SYS with priority less than 3: COPY [OWNER=MANAGER.SYS AND PRI<3];ALL If you choose this (seleq) form of file set selection, SPIFF inserts an OWNER=!HPUSER.!HPACCOUNT in its internal selection equation, unless you explicitly include your own OWNER definition. This prevents users with SM, OP, or AM capabilities from accidentally accessing files that they did not create. Consult one of the following documents for more information about selection equation syntax and semantics: * MPE/iX Commands Reference Manual Volumes 1 and 2 (32650-90003 and 32650-90364) * MPE/iX online help facility range The range of lines of the spool file(s) to copy. By default, only the current record is copied. Any line number specified that is outside the range of lines in the spool file will be handled as though FIRST or LAST was specified, as appropriate. If your range consists of two expressions, the first expression must evaluate to a number no larger the second. filename The name of the target file, the file being copied to. You may specify filename with or without the backreferencing *, as long as the corresponding file equation already exists. If you omit this parameter, SPIFF tries to open the target file using the formal file designator of the first source spool file. The controlling file equation may have been canceled with a RESET command since the source spool file was created. In this case, the attributes of the source spool file are given to the target spool file. Similarly, the file equation may have been redefined. If that case, the file equation will prevail, because it overrides any HPFOPEN parameters specified by SPIFF. ALL Specifies that all of the records in the spool file(s) should be copied. No other range element is allowed if this keyword is used. FIRST The first record in the spool file. LAST The last record in the spool file. * * When used as a source file specification, * specifies the current spool file. * When used as a range element, * specifies the current record in the spool file. recnumber An absolute record or line number of text in the spool file. Records are numbered starting with 0. offset A relative number of records before (-) or after (+) the specified record. count A numeric value, the number of lines to be copied, including the starting record. Operation Notes The COPY command (abbreviated C) copies all or a range of one or more spool files to a new spooled device file (filename). The new spool file is closed at the end of the command and enters the READY state. Spool files may be designated explicitly in a list (for example, #O12345, #O67890), by user and/or account (MYUSER.MYACCT), or by selection equation. If you have a current spool file, you may omit the source file specification and SPIFF will take its source from the current spool file. It is an error to omit the source file specification if you do not have a current spool file. The last source file processed remains as the current spool file, regardless of any earlier current spool file. If you have TEXTed in #O18450, but you then COPY #O18451,#O18452;ALL, the current spool file at the end of the command is #O18452. The target file must be a local spooled device file. An ordinary disc file, a spooled device file on a remote node, or a non-spooled device file (such as a tape drive) is not supported and, if specified, results in an error. The FCOPY subsystem can be used to create such a target file, but this is not recommended: except for the remotely spooled device file, doing so deletes information from the target file, which is usually vital to printing data properly. Once this information has been deleted, it cannot be recovered. Examples of such information include: * The control field for HP2680 environment file records. Without this information, the data in the records appears as unintelligible random characters. * Prespace/postspace information. Without it, all records are printed in postspace mode. * Information that indicates whether or not the first byte of data in each record should be treated as carriage control. A remotely spooled device file--one that exists on another system node--is not supported and, if specified, results in an empty spool file on the remote system and an error message. SPIFF cannot delete this empty spool file on the remote system. Entering CtrlY during command execution stops the execution after the current record is transferred. The current target file is closed. The current source file remains open as the current spool file. When you interrupt a copy operation with CtrlY, the identity of the last record transferred is usually not known. Therefore, you should regenerate the file or use it to create a new target file with the desired subset of records. Examples EXAMPLES OF range: */*+20 *-20/* ALL FIRST/LAST */LAST LAST-100/LAST FIRST,20 100/200 5 EXAMPLES OF COMMANDS: FILE MYLP;DEV=LP FILE MYPP;DEV=PP;ENV=MYENV COPY #O6490;ALL Creates a new spool file with attributes identical to #O6490. COPY [OWNER=MYUSER.MYACCT];ALL,*MYPP Creates a new spool file targeted to device class PP using environment file MYENV. Spool Files belonging to MYUSER.MYACCT are copies to the target file following the environment information. COPY 101,102,103;ALL,*MYPP This is the same as the previous example, except that an explicit list of spoolfileids has been used. COPY [OWNER=SOMEBODY.ELSE];ALL,*MYLP The specified fileset contains no accessible spoolfiles. (SPERR 82) The user does not have SM or OP capability or is not an AM user in the ELSE account. COPY 10000;ALL One or more of the specified spoolfile(s) is invalid. (SPERR 44) Spool file #O10000 does not exist or is inaccessible to this user. Assume that MYLP is a terminal for a session and that spoolfileid 101 was sent to it. > :FILE MYLP=$STDLIST > COPY 101;ALL The target of a COPY or APPEND command must be a local spooled devicefile (SPERR 124) > Redefining the attributes of MYLP makes it impossible to copy spoolfileid #O101 to MYLP. >COPY ALL, *MYPP You have no current TEXT file (SPERR 81) No source spool file is specified nor was one opened in an earlier command.


MPE/iX 5.0 Documentation