COBOL Manual for TNS and TNS/R Programs

Printer and Spooler Output
HP COBOL Manual for TNS and TNS/R Programs522555-006
30-16
Using SPOOLCOM
The subcommands most useful to the application programmer are:
JOB
DEV
JOB
The SPOOLCOM command JOB is very powerful and flexible. Suppose that you are
user 5,40, and you give the command:
) JOB (OWNER 5,40)
You get a report like this:
JOB STATE FLAGS OWNER TIME COPY PAGE REPORT LOCATION
1203 HOLD 4 A 5,40 01/28 1 4 DEVELOP QUINN #ANON
1595 READY 4 A 5,40 01/20 1 59 DEVELOP QUINN #ANON
1671 HOLD 4 A 5,40 12/15 1 1 DEVELOP QUINN #LP3
1672 PRINT 4 A 5,40 12/15 1 1 DEVELOP QUINN #LP3
1737 READY 4 5,40 01/28 1 8 DEVELOP QUINN #ANON
1739 HOLD 4 5,40 01/11 1 1 DEVELOP QUINN #HT
1779 HOLD 4 5,40 01/28 1 1 DEVELOP QUINN #HT
2423 READY 4 A 5,40 01/20 1 4 DEVELOP QUINN #MURPHY
This is much like the report that PERUSE gives you at the beginning of its execution,
except that you have to ask for jobs belonging to user 5,40, or SPOOLCOM lists all its
jobs, not only yours.
Suppose that you want to delete the two jobs belonging to you that have been around
since December 15 (jobs 1671 and 1672). In PERUSE, you must establish 1671 as the
current job, delete it, establish 1672 as the current job, and delete it. With SPOOLCOM
you can give the command:
JOB (OWNER 5,40, DATE FROM DEC 15 1988 THRU DEC 15 1996)
SPOOLCOM reports only your jobs created on that date. When you are certain that the
jobs of 12/15 are the right ones, you can delete the chosen jobs with the command:
JOB (OWNER, DATE FROM DEC 15 1988 THRU DEC 15 1996), DELETE!
If you do not use the exclamation mark (!) SPOOLCOM asks you about each job. If you
use OWNER without a user ID, SPOOLCOM uses the creator accessor ID (your user
ID).
Specify a spooler supervisor with which SPOOLCOM is to communicate OPEN
Report the status of the spooler’s print processes PRINT
Report the status of the spooler SPOOLER
Table 30-3. SPOOLCOM Operations and Commands (Partial List) (page2of2)
Operation Command