COBOL Manual for TNS and TNS/R Programs
Printer and Spooler Output
HP COBOL Manual for TNS and TNS/R Programs—522555-006
30-12
Using PERUSE
Topics:
•
Current Job
•
Current Position
•
Common PERUSE Operations
For more information about PERUSE, see the Spooler Programmer’s Guide.
Current Job
The current job is the job to which the spooler is currently devoting its attention. Almost
all commands that you give to PERUSE apply only to the current job. You cannot tell
the spooler to list job number 2423; you must establish job 2423 as the current job and
then tell the spooler to list the current job.
The current job is undefined when you first start the spooler and after a DELETE
command executes. To define the current job, use the JOB command.
If the first command you give to PERUSE is not a JOB command, any command
except DELETE establishes the job most recently added to the spooler (and owned by
the current user) as the current job.
Current Position
At any given time during your PERUSE session, the spooler has a current position
within its current job, just as a file in an HP COBOL program has a current record
position. If you press Return at the PERUSE prompt, PERUSE lists the next line of the
job and advances its current position.
Example 30-3. PERUSE Output
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
_
Example Effect
JOB 1171 Establishes job 1171 as the current job
JOB * Establishes the job most recently added to the spooler (and owned by
the current user) as the current job
JOB #MURPHY Establishes the job most recently sent to location #MURPHY (and owned
by the current user) as the current job