Printer Management Commands
STARTSPOOLER
The STARTSPOOLER command takes one of two parameters, "C" or "I". When invoked with the C parameter, it deletes all printer definitions, and restarts printer#0 as the default printer. When invoked with the I parameter, it both deletes all printer definitions and resets the printer queue (including the deletion of all hold entries).
STARTPTR / STARTPTRX
The STARTPTR and STARTPTRX commands allow for the definition or redefinition of printers. They have the following format:
STARTPTR <ptr#>,<form#>,<#skip>,<pnamee>
STARTPTRX <ptr#>,<form#>,<#skip>,<subname>,<type>,<orient>,<font>,<size>,<pname>
STARTPTR <ptr#>,<form#>,<#skip>,<subname>,<type>,<orient>,<font>,<size>,<pname> (X
Using the ‘standard’ STARTPTR command will define this printer for output using DirectPrint; all control codes, escape sequences, etc. will be passed “as is” to the printer. Using the STARTPTRX command (or STARTPTR with the “(X” option) allows you to define additional features, including a subroutine that will be invoked when a print job begins and ends, and/or the use of OIPI for output generation.
For either form of the command, ptr# is the number you wish to assign to this printer; form# is the number or numbers of the form queues this printer should service; #skip is the number of pages to eject when each print job completes; and pname is the name of the printer.
When using STARTPTRX or the X option of STARTPTR, subname is the name of a printer support subroutine to call when the print job begins, and again when the print job ends; type is either the literal string OIPI or D for DirectPrint; orient is either “0” for portrait (the default) or “1” for landscape; font is the name of the font to use; and size is the font size to use. Please note that orient, font, and size are only relevant if type is OIPI, and pname is ignored (but still must be specified) if type is OIPI.
For OIPI output to be generated, you MUST be running your REVCMD session using either CTO_CHILD_FORM or CTO_STANDALONE_FORM; if you are using the ‘regular’ REVCMD interface, no output will be generated.
To use the printer ‘support subroutine’, you must have a subroutine that has three parameters. When invoked by the printer subsystem, the first parameter will be set to the form number, the second parameter will be “1” if this is a hold file entry (or “0” if this is regular printer output), and the third parameter will be “0” if this is the ‘print job start’ call, or “1” if this is the “print job end” call.
To specify multiple form queues, surround the form queue numbers in parenthesis. For example, to start printer #0 with form queues 0, 1, and 2, with 0 page skip, and have the output go to a printer named LASER, you would issue the command:
STARTPTR 0,(0,1,2),0,LASER
Note that by default, printer #0 will automatically be started when the spooler is initialized.
SP.EDIT
The SP.EDIT command allows you to display, spool, and delete previously generated "hold entries" (i.e., print files generated while your SP.ASSIGN state included "H"). It may be invoked with the following syntax:
SP.EDIT {<accountname>} {<n>{-<n>}} {D} {F<n>{-<n>}} {L} {MD} {MS} {P} {R} {U}
where the options are:
<accountname> - the name of the application (in quotes) that generated the hold file(s) you wish to examine;
<n>{-<n>} - either the entry number, or a range of entry numbers, to examine;
D - the desired action is to DELETE the hold entries;
F<n>{-<n>} - either the form number, or a range of form numbers, associated with the hold file(s) you wish to examine;
L - the desired action is to LOOK at the hold entries;
MD - Delete the selected hold entries;
MS - Spool the selected hold entries;
P - the desired action is to PRINT the hold entries;
R - change the assignment information for the selected entries to the current SP.ASSIGN state;
U - allow access to all entries (not just those from the current application)
Once the desired entries have been selected, you will be prompted, for each entry, to select your desired action - to display the first 500 bytes of the record, to spool it to the printer, or to delete it. You may also choose to exit from the SP.EDIT process by entering "X", or proceed to the next entry by pressing RETURN. Note that if you have specified on the command line either D, L, or S, then you will be presented only with the specified option - Delete, Look (display first 500 bytes), or Spool the entry - otherwise, you will be prompted in turn for each of the available actions.
Specifying either MD or MS will skip the prompt, and execute the desired behavior without verification.
If you choose to Spool the entry, you will be given the choice of spooling to the printer, to the screen (by selecting T for "Terminal"), to the screen without pagination (by selecting "TN"), or to a file (by selecting "F"). If you spool the entry to a file, you will be further prompted for the file and item name.
SP.OPEN
The SP.OPEN command will instruct the spooler to keep the next, and subsequent, print jobs "open". The subsequent print jobs will be concatenated together into the single print file. To close the print job, issue the SP.CLOSE or SP.EDIT command.
SP.CLOSE
The SP.CLOSE command will close the open print jobs. The newly-closed job will spool to the printer at this time, if print output was selected.
LISTPTR
The LISTPTR command will list all the currently-defined printers.
LISTPEQS
The LISTPEQS command will list any print jobs currently in the queue. The listing will display the entry number, the user and station names of the creator, the date and time the job was created, the output form queue number, whether this is a hold file, and the status (O=open and in-process, C=closed)
SP.KILL
The SP.KILL command will delete a specific printer. It has the following syntax:
SP.KILL D<#>
Where <#> is the printer number you wish to delete.
SP.ASSIGN
The SP.ASSIGN command instructs the print processor in the CTO where to send output specified for the printer. You may choose to have printer output sent either to a physical printer, or to a file on your hard drive. The syntax for the SP.ASSIGN command is:
SP.ASSIGN {HSF<n>MO?}
These options may be combined, or issued individually.
The "?" option will display the currently-assigned settings. The "H" option specifies that output to hold file is selected. The "S" option indicates that output to the physical printer should be suppressed. The "F" option, followed by a form queue number, specifies that you wish output to go to the specified form queue. The "M" message will suppress the print job entry display for subsequent print jobs. The "O" option will keep the print job open (please see SP.OPEN for more details).
When issued without any options, SP.ASSIGN will set the currently-selected options to "F0" (printed output to form queue 0).
Examples of SP.ASSIGN commands include:
SP.ASSIGN F3?
Set the currently-selected options to form queue 3, and display the current settings
SP.ASSIGN HS
Set the currently-selected options to hold file, without any physical print output
TERM
The TERM command displays or modifies your current settings for printer and "terminal" width and depth. When invoked with no parameters, the TERM command will display your current terminal and printer width and depth. You may also specify additional parameters; the format of the TERM command is:
TERM <termwidth>,<termdepth>,<ignored>,<ignored>,<ignored>,<ignored>,<printerwidth>,<printerdepth>
You may skip any parameter you do not wish to change, but you must include the comma delimiter between fields. That is, to specify a printer width of 132 and depth of 60, but to leave the rest of the settings untouched, you could issue the command:
TERM ,,,,,,132,60