Use SP-EDIT to manipulate Spooler hold files. SP-EDIT can be used to display and print all or part of any hold file, to redirect a hold file to either another printer, a tape device, or floppy disk drive, to convert a hold file into a data file, or to delete one or more hold files from the Spooler. You can edit only those files generated from the account you are logged on to, unless you use the U option.
Format
SP-EDIT [selection-options] [control-options] |
Parameter(s)
selection-options |
Can be any of the following: |
|
'account' |
Specifies all hold files created on a particular account. The account name must be enclosed within single or double quotes. |
|
Fn |
Specifies all hold files sent to a particular form queue. |
|
Fn-m |
Specifies all hold files sent to a range of form queues. |
|
n |
Number of the hold file. |
|
n-m |
Specifies a range of hold files. |
|
U |
Allows you to edit hold files generated from any account. You must have SYS2 privileges to use the U option. |
|
control-options |
Can be any of the following: |
|
H |
Suppresses the backup medium label. Use the H option in conjunction with the T option. |
|
L |
Displays the first 500 characters of the hold file. The L option will not work if the file is currently being printed; use the O option to display the beginning of a hold file while it is being printed. |
|
MD |
Deletes all selected hold files without prompting for each separate file (multiple spooling). Be careful when you use the MD option, since it deletes all specified hold files at once! |
|
MS |
Releases all selected hold files without prompting for each separate file (multiple spooling). |
|
N |
Suppresses automatic paging. |
|
O |
Displays the first 500 characters of a hold file that is currently being printed. |
|
P |
Sends the hold file to the printer, overriding the current SP-ASSIGN options. |
|
R |
Changes the form queue assignment and number of copies to those specified by the current SP-ASSIGN options. |
|
T |
Sends the hold file to the tape device or floppy disk drive. |
|
V |
Prevents the removal of trailing blank lines when converting a hold file to a data file. |
|
W |
Used with the T option; W causes SP-EDIT to wait until the tape drive or floppy disk drive is available. |
Description
When you enter the SP-EDIT command, the following prompts are displayed:
ENTRY # nnn DISPLAY (Y/N/S/D/X/(CR))? - |
nnn is the number of the first hold file selected. This prompt allows you to display the first 500 characters of the hold file. (If you want to display the entire hold file, skip to the Spool prompt and type either T or TN at the prompt.)
Responding to the Display Prompt
At the Display prompt, enter one of the following responses:
D |
Skips to the Delete prompt. |
N |
Skips to the String prompt. |
ENTER |
Skips to the next hold file, or it there are no more selected, to the calling process (the TCL prompt, a Proc, or an mvBASIC program). |
S |
Skips to the Spool prompt. |
X |
Exits SP-EDIT and returns to the TCL prompt. |
Y |
Displays the file. |
Any other response skips to the String prompt.
When you select Y, the first 500 characters of the hold file are displayed. If the 500 characters end in the middle of a line, the rest of the characters in the last line are also displayed. Then the String prompt is displayed.
If the hold file you want to display is currently being printed, you must use the O option of SP-EDIT to display it. If the O option is not used, the following message displays and the process either continues to the next selected hold file or, if there aren’t any, to the TCL prompt:
ENTRY # n IS NOT AVAILABLE |
To proceed to the next file, press ENTER at the NEXT? prompt.
If you included the L option when you initially entered the SP-EDIT command, only three responses to the Display prompt are possible:
ENTER |
Skips to the next hold file. |
X |
Exits SP-EDIT and returns to the TCL prompt. |
other |
Any other response displays the beginnings of all hold files that are not currently being printed. |
Responding to the "String" Prompt
The String prompt looks like this:
STRING:- |
The String prompt allows you to start printing a hold file from any line in the file. The line is identified by specifying at the String prompt a unique string of characters that are contained in the line you want to start from.
One of two responses is possible here:
Entering a character string
To move to the first occurrence of a character string in the hold file, enter the character string at the prompt. If the string is found, SP-EDIT moves the beginning-of-report address to the line containing the character string, and the Spool prompt is displayed. If the string is not found, the following message displays and you can try again:
STRING NOT FOUND STRING:- |
Skipping to the Spool prompt.
To skip the String prompt altogether, press ENTER. The Spool prompt then displays.
Responding to the "Spool" Prompt
The Spool prompt allows you to spool the hold file for printing, print the file on your screen, or convert the file to a data file. The Spool prompt looks like this:
SPOOL (Y/N=CR/T/TN/F)?- |
Enter one of the following responses at the prompt:
The following sections describe each of these responses in more detail.
Y |
Releases the hold file for printing or sends it directly to a tape device or floppy disk drive, depending on the currently active options. |
N |
Skips to the Delete prompt. |
ENTER |
Skips to the Delete prompt. |
T |
Displays the entire hold file on the screen. |
TN |
Displays the entire hold file on the screen and suppresses automatic paging. |
F |
Converts the hold file to a data file item, or a series of items, in RUNOFF format. |
Spooling a Hold File
If you select Y and the hold file cannot be spooled, the following message displays and you are returned to the TCL prompt:
YOUR OUTPUT SPECIFICATION IS NO OUTPUT REASSIGN YOUR PROCESS IF YOU WISH TO OUTPUT A HOLDFILE |
You can then modify the SP-ASSIGNments to allow spooling of the file, then re-enter SP-EDIT to spool the file.
Printing a Hold File on the Screen
If you select T to display the entire contents of the file on your screen, the first page is displayed. You can type any of the following:
U |
Repeats the current page. |
T |
Causes output to start from the top. |
X |
Exits the displayed page and returns you to the Spool prompt. Any other character displays the next page. |
These three options are not available if the TN option is used.
Converting a Hold File to a Data File
If the F option is used, the following prompt appears:
FILE NAME- |
Type the name of the data file to which you want to transfer the hold file. Next, this prompt appears:
INITIAL ITEM - |
Type the name of the item. If the item already exists, it will be overwritten.
The hold file is then converted into an item in the file you specified.
If you included the V option when you initially entered the SP-EDIT command, all trailing blank lines will be retained in the data item.
Responding to the "Delete" Prompt
The Delete prompt allows you to delete a file from the Spooler. A print file must be made into a hold file before it can be deleted.
The Delete prompt looks like this:
DELETE (Y/N=CR)? |
Type Y to delete the specified hold file. Type N to skip to the next specified hold file.
Once you have entered Y you cannot stop the deletion. Storage space is returned to the system (that is, it is available), and the print file control block is ready for reuse. But even though the hold file has been deleted, information about it is retained until the control block is reused. Such deleted files will show up on the report displayed by the LISTPEQS command when the L option is used.
Typing anything other than Y at the Delete prompt skips to the next specified hold file. If there are no more files, the following message displays and you are returned to the calling process (TCL prompt, EXECUTE statement, etc.):
END OF REQUESTED PRINT FILES |
Using SP-EDIT Options
The examples shown in the following sections demonstrate some of the more common ways of using SP-EDIT options.
Selecting Hold Files
This section shows some of the ways to select the hold files you want to edit. Once the hold files are selected, the SP-EDIT prompt sequence allows you to perform the editing functions you require.
The following example selects all available hold files, whether generated by the account you are logged on to or not:
>SP-EDIT U |
The next example selects all hold files generated on the ORDERS account:
>SP-EDIT 'ORDERS' |
The next example selects all hold files generated on the account you are logged on to, which were sent to form queue 6:
>SP-EDIT F6 |
Sending a Hold File to Backup Medium
The following example sends the hold file to backup medium and waits for the backup medium to be available; it does not write a backup medium label:
>SP-EDIT THW |
The next example sends all hold files between numbers 7 through 11 that were generated on the account which you are logged on to, to backup medium:
>SP-ASSIGN TS >SP-EDIT 7-11 |
Spooling and Deleting Multiple Hold Files
The following example spools all selected print files to the device specified either by the current SP-ASSIGNments or by any options in effect:
>SP-EDIT MS |
The next example sends all hold files created by the ORDERS account to form queue 4:
>SP-EDIT F4PMS 'ORDERS' |
The next example deletes all selected print files. You can only break the deletion process between deletions:
>SP-EDIT MD |
The next example deletes all hold files created on any account that were to be send to form queues 10 through 20:
>SP-EDIT UF10-20MD |
Using the SP-EDIT Dialogue
The following outline summarizes the sequence of prompts that are displayed after the SP-EDIT command is entered with one or more hold file entry numbers:
Prompt
>SP-EDIT n ENTRY # n DISPLAY (Y/N/S/D/X/(CR))? – |
Parameter(s)
Y |
Displays the file. |
N |
Skips to the String prompt. |
S |
Skips to the Spool prompt. |
D |
Skips to the Delete prompt. |
X |
Exits SP-EDIT and returns to the TCL prompt. |
RETURN |
Skips to the next hold file, or it there are no more selected, to the calling process (the TCL prompt, a Proc, or an mvBASIC program). |
Prompt
STRING: – |
Parameter(s)
RETURN |
Skips to the Spool prompt. |
text |
Scans the hold file until text is located. |
Prompt
POOL (Y/N=CR/T/TN/F)? – |
Parameter(s)
Y |
Releases the hold file for printing or sends it directly to a tape device or floppy disk drive, depending on the currently active options. |
N |
Skips to the Delete prompt. |
RETURN |
Skips to the Delete prompt. |
T |
Displays the entire hold file on the screen. |
TN |
Displays the entire hold file on the screen and suppresses automatic paging. |
F |
Converts the hold file to a data file item, or a series of items, in RUNOFF format. |
Prompt
DELETE (Y/N=CR)? |
Parameter(s)
Y |
Releases remaining storage to the available space table. |
N |
Skips to the next hold file. |
RETURN |
Skips to the next hold file. |