Print File META Commands

Print file related meta commands.


PRINT_FILE <filename,#n,afilename=,prtoptions>

Creates an ASCII file for tables or output from PRINT commands. These files have an extension of PRT.

Valid Options

  • filename – The name of the print file.
    • You may also specify the filename as NULL or $NULL meaning the file will not be saved to disk.
    • If you use $filename, you do not need to include the PRT extension with the filename.


  • #n – The number of the print file.
    • The default is #1, and the allowable numbers are 1-99.
    • You can print to multiple files in one run this way, but you can only have one print file ON (see below) at one time.
    • There is no effective limit on the number of print files that can be open at one time.
    • The number depends on the operating system you are running. [DOS USERS: the FILES= statement in CONFIG.SYS limits the total number of files that can be open simultaneously (including operating system and program files; use >STATUS FILES to list all open files).
    • When you exceed this limit the program will print an error message.
    • It is possible to increase the FILES= specification in the CONFIG.SYS file to allow more print files to be open, but this can cause other errors if system memory is insufficient.]
  • afilename= – Is the alternate or alias name for this print file.
    • You would specify this instead of a #n after the filename.
    • Names can be alphanumeric but must start with an alpha character.

Valid PRT Options

  • APPEND – Adds the tables to the end of the file if it already exists, otherwise creates the file.
  • BOTTOM_MARGIN=# – Number of blank lines at bottom of page.
    • Default is 3.
    • This affects the number of lines that will print on the body of the page.
    • The body of the page is the PAGE_LENGTH minus the TOP and BOTTOM margins.
    • You will increase or decrease the number of lines in the body of the page by changing the default for this option.
    • The body of the page must have at least five usable lines remaining after the top and bottom margins are specified.
  • COPIES=n – In MPE, this specifies number of times to print the spool file.
  • ECHO – Prints the table to the print file and to the screen.
  • FIXED_FORMAT – Gives each line in the print file a fixed length, for example, each line will be the defined maximum line length (default 132) filled with blanks.
  • FORM_FEED – Specifying -FORM_FEED lets you override program default form feeds (^L).
  • HEADER_PAGE – Prints a leading header page with the following information: print file name, program, version, mode, file names, date and time.


Header Page for Survox Printfile c:\tests\example.prt
PROGRAM Mentor 8.8.4 (1,22JUNE2015) with input/output:
test.spx to -test.lfl
22 JUNE 2015 14:50

You can specify this option in either the INITIAL or MENTINITIAL file to make it the default for all sessions, as follows:

  • LASER_CONTROL=<filename> – Refers to the name of the laser control file (located in the Survox CONTROL directory or group).
    • This file contains the escape sequences that will be passed to the print file when back slash (\) commands for text enhancements such bold (\B) or underlining (\U) are encountered.
    • You may have more than one laser control file.
  • LASER_NUMBER=# – Specifies which laser printer to use.
  • PAGE_LENGTH=# – Total number of print lines on a page.
    • Default is 66.
  • PAGE_WIDTH=# – Number of characters per print line.
    • Default is 132.
    • Maximum is unlimited.
  • TOP_MARGIN=# – Number of blank lines at top of page.
    • Default is 3.
    • You may set this to zero (0).
  • USER – Allows you to override the PRT extension, and specify any extension you wish.

The syntax is:

>PRTF filename^ext,USER

If you do change the print file extension then you must refer to the new extension (filename^ext) if you reissue the >PRTF statement (see >PRTF ON and OFF).

Two options can be used as a toggle switch:

  • 1 = ON – Makes this file the default print file (once the file has been opened with a previous >PRTF command).

The syntax is:

>PRINT_FILE filename ON
  • 2 = OFF – Turns off printing to the default print file (previously turned on with >PRTF ON).
    • Does not close any print files, but you must specify the file to print to after turning the default print file off.

The syntax is:

>PRINT_FILE filename OFF

You can also have the name assigned by a >STUDY_NAME command:



This >PRINT_FILE command will substitute the name specified on the >STUDY_NAME command (BANK) for asterisk (*).

You can use >PRINT_FILE with no options:



This example will close a print file and will not open another. If you have more than one print file open, you must specify a file name before the semicolon (;).

This is a simple example of how to print to two print files at once:

>PRINT_FILE file1 #1
>PRINT_FILE file2 filename=abc
PRINT "this prints to file1, the default printfile"
PRINT #1 "this also prints to file1"
PRINT #"abc" "this prints to file2"
MODIFY fname[1.4$]="abc"
PRINT #fname "this also prints to file2"

You must close a print file to print or browse it.(>PRN, >BROWSE).




Allows you to set a group of commonly used print file options that will be used each time the >PRINT_FILE command is issued in that file. This is often put in the mentinit file to set standard print controls. >-PRINT_FILE_DEFAULTS will turn off the group of print

You can set options with >PRINT_FILE_DEFAULTS and then modify them with the >PRINT_FILE command.


>PRINT_FILE_DEFAULTS page_length=60 page_width=80
~CLEAN PRINT "file1 has a page length of 60 and a width of 80."
>PRINT_FILE file2 page_width 20
~CLEAN PRINT "file2 has a page length of 60 and a width of 20."
~CLEAN PRINT "file3 has the system defaults of a page length of 66 and a width of 132"