sp-edit Command

The sp-edit command accesses existing spooler entries for processing or deletion.

Syntax

sp-edit {options}

Parameter(s)

options

user.ID

On D3, spooler entries are stored under the user-ID of who generated them. This accesses the spooler entries created by the specified user-ID. Single quotation marks are required around the user-ID.

file.number
{-number}

Designates print file, or a range of print files, if available, and must be within the range of 1 through 31,999, inclusive. When a range of print files is specified, the second number must be higher than the first.

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 files, when used in conjunction with a print file number or a range of print file numbers.

NOTE—Must be used with the m option.

fnumber{-number}

Edits jobs for a specific form queue, or a range of form queues, and must be an integer number in the range of 0 to 1023.

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.

NOTE— Required for t options.

k

Keep raw characters. This option removes the conversion of nondisplayable characters to periods.

l

Displays first 500 characters of 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 parameters.

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 files.

t{w}

Directs the hold file to tape. This supersedes a p option. w waits for the tape to be readied, if it is not already.

NOTE—If used in combination with the s option-nothing will be spooled

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.

z

Sends a hold file to the spooler and then removes the entry when completed.

When options are omitted, all available (unspooled) entries generated from the current user-ID are retrieved for processing. Only files in the hold status are available. 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 that invoked the command. After sp-edit is invoked, the options below 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 redisplay the first 500 bytes again. If the print file is not being created or output, the display is followed by the prompt, string-.

n

Skips to the string prompt.

s

Skips to the spool prompt.

d

Skips to the delete prompt.

x

Terminates sp-edit and returns to TCL.

Pressing ENTER at TCL skips to the next print file. Any other response skips to the string prompt.

string:

string

This process 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.

Pressing ENTER at TCL 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 pressing ENTER.) 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 items 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 command. It is necessary to be logged onto the user-ID that created the hold file in order to copy it to a data file. After the item is written, the delete prompt displays. y deletes the entry.

n

(Or pressing 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 floppy disk; 8192 for half-inch tape). This 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, this 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 that includes the word spooler, the account name, and the user-ID. To suppress the label, include the h option (or hdr-supp modifier) with the sp-edit command. The tape label can also be suppressed by including the hdr-supp modifier (or h option) with the command that originally creates the hold file.

Example(s)

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.

See Also

listpeqs Command

Options

shp-kill Command

sp-assign Command