STARTPTR Command

The STARTPTR command initializes or restarts a system printer.

Format

STARTPTR printer [,form , skip ,type-line ,[options]]  

Parameter(s)

printer

Number of the printer. It can be any number from 0 through 99. You must enter a printer number.

form

Form queue number. It can be any number from 0 through 125. The form queue number is required when you are initializing a printer.

skip

Number of pages to skip between print files. This can be from 0 through 9 pages.

type-line

Specifies two things: the printer type and the line number to which the printer is assigned. Do not separate type and line by a comma. The type can be either P (parallel) or S (serial). The line number can be any valid line (process) number for mvBase printers.

options

The following options are supported:

A

Begins the alignment process. There must be a print job waiting in the queue in order for the alignment process to work.

Nn

Used with the X option to specify the number of lines per page (where n specifies number of lines per page). If the N option is not used, the default page length is 66 lines.

S

Specifies that the form-feed command at the beginning of a print file is to be ignored by a serial printer. This option is used when skip is set to a number other than zero.

X

Used to count page lines and output the correct number of blank lines when a serial printer does not recognize an X'0C' as a page-eject command. The X option can be used in conjunction with the N option.

Parameters must be entered in the exact order shown, separated by commas where indicated.

Description

STARTPTR can be used to assign form queues to a printer and to specify this printer information:

The form queue, type, and line parameters remain set until they are changed.

If only one form is assigned, it is good practice to assign it the same number as the printer number.

To assign multiple form queues to the printer:

  1. Enclose the form queue numbers within parentheses and separate them with commas: ( form1 , form2 , form3 ). No more than three form queues can be assigned to any one printer.

  2. When the A option is used, this prompt displays:

    LINES?

  3. Type the number of lines you want printed for each alignment test.

  4. After each alignment test, this prompt displays:

  5. AGAIN (Y/T/N)? -

Initializing a Printer

This example shows how to use STARTPTR to initialize a printer:

Changing a Printer’s Form Queue

The next example shows how to assign multiple form queues to a printer that has already been started:

Jobs are printed in the order specified by the STARTPTR command. In the example above, any jobs in form queue 1 are printed first, then any jobs in form queue 5 are printed, and finally any jobs in form queue 6 are printed.

Restarting a Stopped Printer

Restarting is the simplest use of STARTPTR. Use this form of STARTPTR to restart a printer after a stop. All other parameters remain unchanged:

>STARTPTR 1

Laser and Inkjet Printers

Whenever an mvBase spool file containing a print job is despooled to a printer, the despooling process examines the print job for linefeed (LF) and formfeed (FF) characters. When it finds them, it inserts into the output stream, a number of ASCII NUL characters (x00) to act as delay characters. These characters were intended to allow the print head on slow dot matrix, or the paper handling mechanism on serial printers and line printers, to complete their movements for line feeds and form feeds.

With the advent of laser printers, inkjet printers and more modern printing technologies, these delay characters are generally no longer necessary and could be set to 0, especially if they cause a problem for some printers (or specialized output devices such as plotters).

These delay parameters can be set using the TERM or SET-TERM TCL commands:

SET-TERM {width, depth, skip, lf-delay, ff-delay, backspace, ptr-width, ptr-length, type} {(n {-m})}

TERM {width, depth, skip, lf-delay, ff-delay, backspace, ptr-width, ptr-length, type} {(R)}

Parameter(s)

lf-delay

Number of null characters output after each carriage return. These delay characters provide a pause for terminals or printers that cannot display characters as fast as the CPU outputs them. The default value is 1. The maximum value is 127.

ff-delay

Number of null characters output after a form feed character for either the terminal or the printer. The default value is 5. The maximum value is 127. If you specify 0, no form feed character is sent to either the terminal or the printer at the beginning of a page. If you specify 1, a form feed (FF) character is sent to the printer (hexadecimal '0C', CHAR(12)), but not to the terminal. If you specify 2 or greater, the form feed character is sent to both the printer and the terminal.

To set these delay parameters to 0, it might be expected that the process running the despooler (which is started by the STARTPTR TCL command) needs to have its lf-delay and ff-delay parameters set.

In reality, the values for these parameters are taken from the process that started the despooler (i.e., the process on which the STARTPTR command was executed).

Thus if printers are started during the USER-COLD-START Proc, then a TERM ,,,0,0 statement should be executed before the STARTPTR command(s) followed by a TERM ,,,1,5 to reset the values to their defaults.