HP (Hewlett-Packard) HP 3000 Laptop User Manual


 
444 Chapter 6
Command Definitions P-R
PRINT
NUM Specifies numbering of the lines as they are displayed. The numbers
appear in front of the line (record) being displayed. The number displayed
is the actual line number for numbered files; for unnumbered files, relative
numbering begins with 1.
NONUM Requests that trailing digits at the end of each record in the file be
displayed as part of the file content, rather than being interpreted as line
numbers.
Operation Notes
This command prints the contents of filename to the standard list device, unless another
destination is specified with the outfile variable.
If an interactive user takes more than HPTIMEOUT minutes to respond to the page number
prompt, MPE/iX terminates the CI. This occurs only if HPTIMEOUT has been set to a
positive value.
In a batch job, in which the filename defaults to $STDINX, some MPE/iX commands such as
:EOD, EOF, JOB, EOJ, and DATA do not execute as part of the original job when they follow
a PRINT command. For example, if a JOB command follows a PRINT command, only those
commands preceding PRINT are executed in the original job, and nothing is printed. The
JOB command following the PRINT command is taken as the start of a new job, which is
then streamed as a second job.
Use
This command is available in a session, job, program, or in BREAK. Pressing Break aborts
the execution of this command.
Examples
To send the contents of MYFILE to the line printer, enter the following commands:
FILE XXX;DEV=LP
PRINT MYFILE, *XXX
In this example, the file XXX is equated with the line printer. Then the file MYFILE is
"printed" to the file *XXX.
Use EDIT/V to create the command file TAIL which prints the last 10 lines of a file:
PARM FILE, LAST=10
PRINT !FILE; START = -!LAST
The first line defines FILE as a required parameter of the command file and creates an
optional parameter, LAST the default value of which is 10.
The second line instructs the PRINT command to print the dereferenced value of FILE (the
value entered by the user). The second line also tells the command to use the negative of
the dereferenced value of LAST (10 by default) as the starting point for printing (that is, 10
records from the end).
To print the last 10 records of the file called MYFILE, enter: