Office of Information Services - Application Programming

SETPTR Commands


The SETPTR command is used to set the spooler options for logical print units 0-255.

Omitted arguments on the command line leave their respective characteristics unchanged.

These spool options set by SETPTR remain in effect until
  • explicitly changed (by using the SETPTR command again),
  • until you leave the system (LOGOUT),
  • leave the PI/open environment (QUIT).

  • SETPTR [lpu] [,[paper width] [,[paper length]] [,[top margin] [,[bottom margin] [,[output mode] [,options...]]]]]


    lpu Logical print unit 0-255 (default 0), or ASYNC line (if output mode 2 is set), or MPC printer number (if output mode 5 is set)
    Width (default 132 -- maximum 999)
    Length (default 60 -- maximum 9999)
    Top Margin - number of blank lines (default 3)
    Bottom Margin - number of blank lines (default3)
    Output Mode (see below for additional detail)
    1 Spool Queue
    2 Output to an assigned ASYNC line
    3 Output to a hold file
    4 Output to an assigned tape
    5 Output to an assigned printer
    Options
    AS name -- uses name as the second line of banner page
    AT printername -- routes to printer printername. EMAIL uses AT rkrause@pittstate.edu,FORM EMAIL
    BANNER [[UNIQUE] name] -- uses name as the second line on the banner page; first line is the user ID. (If the output is directed to &HOLD&, please select the section "Printing to the &HOLD& File", under "Description" below.
    BRIEF -- does not ask the user if the arguments are correct. (Useful in Sentences and Paragraphs).
    COPIES n -- prints n copies of the print file but only one banner page.
    DEFER -- time defers printing of report until the specified time. Time can be specified in any format acceptable to the INFO/BASIC ICONV MT conversion (for example, 12:00).
    FORM formname -- specifies that printing does not occur until the system operator indicates that the form formname is in the printer; formname must be six characters or less. EMAIL uses AT rkrause@pittstate.edu,FORM EMAIL
    FTN -- uses FORTRAN control conventions.
    HOLD -- places job in the spool queue in the hold state.
    INFORM -- is the same as REPORTING.
    LNUM -- prefixes each line with a line number.
    NODEFAULT -- specifies that the options that are not set in the command line are to be left unchanged. This must be the last option on the command line. If this option is not specified and you have previously changed an option from the default setting, the option will revert to its default setting.
    NOEJECT -- disables skipping to a new page at the end of the print file. (EJECT is the default).
    NOHEAD/NHEAD -- disables printing of a banner page before the print file.
    NOTIFY/NFY -- notifies the user when printing is completed.
    REPORTING -- will cause the spooler job number to be displayed at the terminal when the spool file is closed.
    RETAIN -- causes jobs to remain in the spool queue in the hold state after they have been printed.
    USEROPTS option_string -- passes option_string transparently to the underlying operating system utilities. This allows users with customized operating system utilities to access specialized functionality.
    NOTE: printername (used with the AT keyword), and formname (used with the FORM keyword) must not be specified together in the SETPTR command.

    OUTPUT MODE ADDITIONAL INFORMATION

    MODE 2 -- Printing to Assigned ASYN line
    All printer output goes directly to an assigned ASYNC line (usually a serial printer). SETPTR mode 2 must be preceded by "ASSIGN ASYNC n", where n represents a terminal port (see the ASSIGN and P.ATT commands). The SETPTR logical print unit lpu argument must be the ASYNC line number assigned previously and must be a number in decimal format.
    MODE 3 -- Printing to the &HOLD& file
    Output is directed to a record in a Type 1 file specified by the &HOLD& VOC entry. If this file does not already exist, it is created for you.
  • If only BANNER is specified, the output print file is named P#xxxx, where xxxx is the unit number. Subsequent print files overwrite any previous records named P#xxxx.
  • If BANNER name is specified, then the output print file is called name.
  • If BANNER UNIQUE is specified, the output print file is named P#0000_nnnn, where nnnn is the value of a counter that is automatically incremented for each SETPTR command.
  • If BANNER UNIQUE name is specified, then the output print file is called name_nnnn, where nnnn is the value of a counter, automatically incremented for each SETPTR command. UNIQUE must be the first argument and name the second argument, for this option.
  • MODE 4 -- Writing print files to tape
    All output destined for the line printer is written to tape in print file format. The output can later be spooled directly from tape to a printer by using the SP.TAPE command. Mode 4 can be used to produce a printed print file to tape if available disk space is low or if a large print file is being transferred to another system for printing.
    The SETPTR Counter

    The counter used by Option 2 and Option 4 is unique to each &HOLD& file and is stored in the record named NEXT.HOLD in the dictionary portion of the &HOLD& file, D_&HOLD&.

    The counter is incremented by one each time the SETPTR command is executed. After it reaches 9999, it starts again at 1. To ensure that unique print filenames are placed in the &HOLD& file, you must execute the SETPTR command using mode 3 before each print file. After a printe print file is produced, the original print file is overwritten if an output print file record with the same name exists in the &HOLD& file.


    Examples

    Programs

    Back to Top


    Tools Library Menu

    Application Tools- Cleanup Tools- OS.LIB- PSU.LIB- Paragraphs- Program Lists- References Menu- Search Tools- Skin Menu Maker- Subroutines