A SERVICE OF

logo

442 Chapter 6
Command Definitions P-R
PRINT
PRINT
Prints the contents of a file.
Syntax
PRINT filename [OUT=outfile] [START=m] [END=n] [PAGE=p] [;UNN | NUM] [;NONUM]
Parameters
filename Actual file name of the file to be printed to $STDLIST, unless outfile is
specified as a destination. To specify an HFS file, begin the filename with a
dot (.) or slash (/). The filename may specify either a temporary or a
permanent disk file.
File equations are ignored unless an asterisk (*) precedes filename,
indicating a backreference.
The filename may be $STDIN or $STDINX.
If you do not specify a file name, PRINT takes its input from $STDINX and
continues to do so until you enter the :EOD command on a new line.
outfile Specifies a destination other than $STDLIST for filename. If filename has
embedded carriage-control characters (CCTL), PRINT inserts a blank in
place of the CCTL in the outfile. New files are created TEMP. File equations
are ignored unless an asterisk (*) precedes outfile, indicating a
backreference. You must use a file equation to overwrite a permanent file.
You must use the ;SAVE option in the file equation to overwrite a
permanent file.
If outfile is not interactive with the user's $STDIN file, the PAGE parameter
is ignored. (Refer to the FRELATE intrinsic for additional information on
"interactive pair" of files.)
To redirect output to the line printer (DEV=LP), you could use the following
commands:
FILE PRT;DEV=LP;CCTL
PRINT MYFILE;OUT=*PRT
Specifies the record number of the first file record to be displayed. An m is
relative to 1. If m is a negative number, it specifies a record location
relative to the end-of-file, that is, -5 indicates the fifth record from the
end-of-file. Zero is an invalid specification. Default is the first record of the
file.
For byte-stream files, the first line (or "record") corresponds to the bytes
from the beginning of the file to the first newline character, the second line
contains bytes between the first newline character and the second newline
character, and so on.