tcl.sp-edit Verb: Access/Spooler

tcl.sp-edit

Command tcl.sp-edit Verb: Access/Spooler
Applicable release versions: AP, R83
Category Spooler (24)
Description accesses existing Spooler entries for processing or deletion.

When options are omitted, all available (un-spooled) entries generated from the current user-id are retrieved for processing. (In R83, the spooler entries are associated with the current account). Only files in the "hold" status are available. (See "sp-assign" and "sp-kill"). The first 500 bytes of the print job are available for display, but the job may not be accessed in any other manner.

The hold files may be left in the queue, output to tape, printed, deleted, or copied to data file items. (Hold files are generated by using the "h" option in "sp-assign" to send all subsequent printer output to a hold file, or by using "sp-kill" to change a currently spooled file to a hold file.)

With no options in effect, "sp-edit" returns all available hold files generated by the user-id (or account name in R83) which invoked the verb.

After the "sp-edit" is invoked, the following options are available depending upon the options previously selected:

display? (y/n/s/d/x/(cr))? -

y Displays the first 500 bytes. If the job is being created or output, and the "l" option is in effect, the prompt "another ?" displays. The only proper response to this prompt is "y" to re-display the first 500 bytes again. If the print file is not being created or output, the display will be followed by the prompt, "string-".

n The process skips to the "string" prompt.

s The process skips to the "spool" prompt.

d The process skips to the "delete" prompt.

x Terminates "sp-edit" and returns to TCL.

<enter>

Skips to the next print file.

Any other response skips to the "string" prompt.

string:

string<enter>

Scans the print file for the first occurrence of the given string, and begins output at the beginning of the line containing the string. If the string is not found, a message prints indicating this, and the operator is prompted again.

<enter>

Skips to the "spool" prompt.

spool:

y Enqueues the print job for output to printer or tape as specified by the "sp-assign" option in effect when the job was created. (See "r" option below). After the file is enqueued, "sp-edit" attempts to process the next hold file, if any. If neither the "sp-assign" nor the "sp-edit" specifies printer or tape as the output destination, a message displays.

n (or <return>) Skips to the "delete" prompt.

t Directs output to the terminal, then returns to the "spool" prompt. At the end of each page of terminal display, press any key to view the next page or <ctrl>+x to stop spooling to the terminal and return to TCL.

tn Directs output to the terminal without pausing at the end of each page, then returns to the "spool" prompt.

f Copies to data file item(s) and prompts for additional information. When used with the "c" option on the TCL line, this option suppresses the embedded (OP/Runoff) ".CHAIN" commands and multiple item-ids for a print job, creating one item only.

The OP (and Runoff) commands ".bp" and ".nf" are inserted at the beginning of the data file item before the hold file is copied. Any trailing blank lines in the hold file are not copied to the data item. To have trailing blank lines copied, use the "v" option when initiating the "sp-edit" verb. It is necessary to be logged onto the user-id (or account name in R83) which created the hold file in order to copy it to a data file. After the item is written, the delete prompt is displayed. "y" deletes the entry.

n (or <enter>, or any other response) Skips to the next print file or TCL, if no more print files exist.

Spooling Hold Files to Tape

If the process is to copy the hold file to tape, the tape is checked to determine if it is attached. If the tape is not attached and it is available, the tape is attached using the system default block size (16384 for SCT; 500 for diskette; 8192 for half-inch tape). The following message displays:

"tape attached block size: nn"

If the tape was already attached, the same message is output, except the block size used is the size set at "t-att" time.

If the tape is attached to some other line, the following message displays:

"tape attached to line nn"

If the "w" option is in effect, the process waits until the tape becomes available.

A tape label is written on the tape which includes the word 'spooler', and the account.name (in AP, the user-id is also included). To suppress the label, include the "h" option (or "hdr-supp" modifier) with the "sp-edit" verb. The tape label can also be suppressed by including the "hdr-supp" modifier (or "h" option) with the verb that originally creates the hold file.
Syntax sp-edit {options}
Options 'account.name' In R83, this accesses the Spooler entries created by the specified account name. Single quotes are required around the account name. "sys2" privileges are required to use this option. The account name option overrides the "u" option.

'user-id' In AP, Spooler entries are stored under the user-id of the user who generated them. This accesses the Spooler entries created by the specified user-id. Single quotes are required around the user-id.

file.number{-file.number} Designates print file, or a range of print files, if available. Must be within the range of 1 through 600, inclusive. When a range of print files is specified, the second number must be higher than the first.

b Suppresses the ".bp" and ".nf" (Runoff) commands in each item when spooled to a file with the "f" option. See "warnings".

c Places the entire print job into one item when spooled to a file, rather than breaking each page of the report into a separate item and inserting (Runoff) "chain" statements at the end of each item to chain each item to the next item.

d Deletes print file(s), when used in conjunction with a print file number or a range of print file numbers.

fnumber{-number} (integer number(s)) Edits specific hold file, or a range of hold files. Must be in the range of 0 through 125.

h Suppresses the tape label if the hold file destination is tape. The option is effective with either the "sp-assign t" specification or the "sp-edit t" specification.

k Keep raw characters. This option removes the conversion of non-displayable characters to periods.

l Displays an enqueued print file.

m Suppresses remaining prompts when used with the "d" or "s" options.

n No pause. Suppresses the pause at the end of each page on the terminal.

o Looks at the print file that is being output. This must be used with "l" option.

p Sends the print file to its assigned printer. This option overrides the current "sp-assign" parameter(s).

r Uses the current "sp-assign" parameters for the form number and copy count when an entry is spooled. The form number and copy count are changed permanently.

s Spools the print file(s).

t{w} Directs the hold file to tape. This supercedes a "p" option. "w" waits for tape to be readied, if it is not already.

u Edits all hold files. This option requires sys2 privileges.

v Converts a hold file to a data file. It does not remove any trailing blank lines at the bottom of a page.
Example
sp-edit mso

Obtains all print files created by the current user-id, and views (observes) 
them.

sp-edit msp1-5

Obtains all print files created on the current user-id, and sends jobs 1 
through 5 to the printer.

sp-edit nd1-10

Obtains print jobs 1 through 10, and deletes them.

sp-edit 10-20

Obtains available hold files with entry numbers 10 through 20 generated by the 
current user-id.

sp-edit ru3

Edits entry# 3 (generated by any user-id), and uses the current sp-assign 
output queue and number of copies settings.

sp-edit t7-11

Sends to tape each print file with entry #'s 7-11 generated by the current 
user-id.

sp-edit 4lu

Displays the first 500 bytes of print entry #4 (created by any user-id, if the 
user has "sys2" privileges), and the print file is not being output.

sp-edit f3 ms

Obtains all print files created on the current user-id for output queue 3, and 
spools them.

sp-edit 'pr' f4 p ms

If the current user-id has sys2 privileges, this spools all available print 
files created by the "pr" user-id in output queue 4 to the printer, 
and ends sp-edit.

sp-edit md

Deletes all available files created by this user-id.

sp-edit mud

Unconditionally deletes all print files.
Purpose
Related spooler.options
tcl.listpeqs
tcl.sp-assign
spooler.commands
tcl.sp-kill
tcl.sp-edit.link