COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Here are some examples of spooler commands that involve the current job and the current position.
Suppose you have just started the spooler. The spooler always begins by listing all jobs in its queues
that belong to you. Suppose that the list is:
PERUSE - T9101D20 - (8JUN92) SYSTEM \LEO
JOB STATE PAGES COPIES PRI HOLD LOCATION REPORT
1171 READY 3 1 4 #EXCEP R01 DEVELOP JAN
2423 READY 4 1 4 A #MURPHY DEVELOP JAN
_
To establish job 1171 as the current job, you enter:
_JOB 1171
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.
If you have a job in the HOLD or READY state, you can delete it by making it the current job and
issuing the DELETE command.
908 Printer and Spooler Output










