COBOL Manual for TNS and TNS/R Programs
Printer and Spooler Output
HP COBOL Manual for TNS and TNS/R Programs—522555-006
30-14
Using PERUSE
Suppose that the last page of the listing contains a summary, and you want to check
that first. You enter:
_LIST L
The last page of the listing appears on your terminal screen. If it looks acceptable, you
can relocate the listing to a defined device by entering a command such as:
_LOC #LP5
If the printer associated with #LP5 is not busy, your job starts printing there. As soon as
the job is printed, the spooler deletes the job unless its HOLDAFTER attribute is set.
If you want to browse through your job, use the function keys to list groups of lines.
Function key n lists the next 2
n
lines, starting at the current position; for example,
function key 1 lists the next 2 lines, function key 2 lists the next 4 lines, function key 3
lists the next 8 lines, and function key 6 lists the next 64 lines (approximately a page in
a typical report).
To find certain texts in your job, use the FIND command. Suppose you compile an
HP COBOL program, sending its listing to a spooler location that is not associated with
a device. The job remains in the spooler in a READY state. If you list the last page of
the job (using the LIST L command), you can view the summary and see whether the
compiler found any errors. If it did find errors, you can use the FIND command to track
them down easily.
If you have a job in the PRINT state and you suddenly remember that you wanted to
make additional copies, you can issue a HOLDAFTER command to keep the spooler
from automatically deleting the job at the end of the printing operation. If the spooler
collects your HOLDAFTER command before it finishes listing the job, then after the job
finishes printing, it goes into the HOLD state. You can then request that three more
copies be sent to the same location:
_COPIES 3
_HOLD OFF
If you want a different banner on the additional copies, you can change the job’s report
name before setting the HOLD state to OFF. If you want to list the three extras copies
at a different location, you can use the LOC command to change the location before
setting the HOLD state to OFF.
If your current job is 300 pages, and you want to print 5 copies of pages 150 through
159 at the printer associated with location #LP2.A, you can issue the commands:
_LIST /OUT $S.#ABBREV/ 150/159 C
_JOB #ABBREV
_COPIES 5
_LOC #LP2.A
This creates a new spooler job with the location ABBREV, containing only the chosen
pages. The letter C in the LIST command transmits all CONTROL and SETMODE
commands embedded in the job to the new job. Without C, the pagination of the new
job does not match that of the old. The JOB command makes the job most recently
sent to #ABBREV the current job.