Lesson 4 Monitoring Jobs [ Using the 900 Series HP 3000: Advanced Skills Module 3: Batch Processing ] MPE/iX 5.0 Documentation
Using the 900 Series HP 3000: Advanced Skills Module 3: Batch Processing
Lesson 4 Monitoring Jobs
Introduction
Lesson 4 presents the following command: LISTSPF and SPOOLF. These
commands let you monitor job progress:
You had the opportunity in the last lesson to STREAM jobs that were
scheduled to run at various times, or that were purposely set not to
print (deferred priorities). Now you will monitor the progress of the
jobs and look at the job listings of your completed jobs. This allows
you to determine whether or not the job was successful. And you will
learn how to alter the output priority so that a job listing can print.
SPOOLER commands
The spooler commands LISTSPF and SPOOLF let you look at, manipulate, or
delete spool files and job listings.
A spool file is an intermediate file that is awaiting printing. Both
jobs and sessions may create spool files, such as $STDLIST (your job
listing)--so can other processes or applications that you use on the
computer. Spool actually stands for simultaneous peripheral operations
online.
Spool Files are needed because output devices such as printers can handle
only one thing at a time. They are nonshareable. Several jobs or
sessions may attempt to use the printer simultaneously. That will not
work. So, each job or session item that is destined for the printer is
stored in a a spool file to await its turn. The system sends the spool
files to the printer in order: the highest-priority items go first. If
two items have the same priority, then the system prints them on a
first-come-first-served basis.
Displaying spool file information
NOTE Make sure that you are logged on as USERx.ACCTx, in the CLASS
group. Also make sure that the file designator, LP exists on your
system, so that your jobs print on some device (line printer).
First, you must stream a job so that a spool file is created. Enter the
following command to execute JOB1, which modifies a file:
STREAM JOB1
(Note the job number that is displayed: #Jxxx.)
To look at the output (going to the printer) spool files for your
user.account, enter:
LISTSPF
Unless no spool files exist at the moment, you should now see a display
similar to this. Note the files associated with the JOB1 job number. In
this example, the JOB1 job number is #J172.
_______________________________________________________________________________
| |
| |
| SPOOLID JOBNUM FILEDES PRI COPIES DEV STATE RSPFN OWNER |
| |
| #O1585 J172 $STDLIST 1 1 LP CREATE USER1.ACCT1 |
| |
| INPUT SPOOL FILES OUTPUT SPOOL FILES |
| ACTIVE = 0; CREATE = 1; READY = 0; |
| OPEN = 0; DEFER = 0; SELECTED = 0; |
| READY = 0; DELPND = 0; SPSAVE = 0; |
| PRINT = 0; XFER = 0 |
| PROBLM = 0; |
| |
| TOTAL IN FILES = 0; TOTAL OUT FILES = 1; |
| IN SECTORS = 0; OUT SECTORS = 2048; |
| |
| OUTFENCE = 7 |
| OUTFENCE = 7 FOR LDEV 6 |
| |
_______________________________________________________________________________
Note the files associated with the JOB1 job number. In this example, the
JOB1 job number is #J172.
Input and output spool files
Output spool files are identified by #O (pound sign and the letter "oh")
followed by a number. Input spool files (those destined not for the
printer but for some processing by the system) are identified by #I
(pound sign and the letter "i" followed by a number).
The LISTSPF O@ command displays all the output spool files for your
user.account. This is the default. The LISTSPF command show exactly the
same information.
The LISTSPF I@ command displays all the input spool files for your
user.account.
The LISTSPF @ command displays all the input and output spool files for
your user.account.
NOTE You see only the spool files associated with your user.account.
Most input spool files are "private." Access to them is restricted.
To see a listing of spool files belonging to other users, use this form:
LISTSPF @;SELEQ=[OWNER=user.account]
You must enter the brackets as part of your command.
The ;SELEQ=[...] option permits you to select (or filter) the LISTSPF
display in several ways. The OWNER option is one of the selecting
methods. You will find information about the others in the online help
facility.
The information that you see on the screen helps you to determine whether
your job has completed producing its output and whether the output is
printing or not. Each job that you run is identified by a job spool file
number. The various spool files associated with that job are identified
by input and output identification numbers. The headings on the screen
help you identify the information you see there. Examine the following
table to learn more about the headings.
--------------------------------------------------------------------------------------------
| | |
| Heading | Definition |
| | |
--------------------------------------------------------------------------------------------
| | |
| SPOOLID | A spool file number--also called a spool file ID number (typically |
| | there is more than one spool file per job): |
| | |
| | Input files begin with "I". Output files begin with "O" |
| | |
--------------------------------------------------------------------------------------------
| | |
| JOBNUM | Job number. |
| | |
--------------------------------------------------------------------------------------------
| | |
| FILEDES | The file designator for the spool file. |
| | |
--------------------------------------------------------------------------------------------
| | |
| DEV | Device where spool file will eventually be printed. |
| | |
--------------------------------------------------------------------------------------------
| | |
| PRI | Output priority. (This determines whether the spool file will print |
| | or not, depending on whether the priority is greater than or less than |
| | the OUTFENCE of the DEV.) |
| | |
--------------------------------------------------------------------------------------------
| | |
| COPIES | Number of copies of the spool file that will be printed. |
| | |
--------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------
| | |
| STATE | "Condition" of the file: |
| | CREATE = output spool file being created |
| | READY = ready to be printed |
| | ACTIVE = input spool file being created |
| | OPEN = input spool file being read by a job |
| | PRINT = output spool file being printed |
| | DEFER = output spool file in deferred state |
| | SPSAVE = spool file has been saved after printing |
| | PROBLM = spool file destination cannot be found |
| | DELPND = delete flag has been set--spool file will be deleted when the |
| | last person accessing it closes the spool file |
| | XFER = being transferred to another system to print |
| | |
--------------------------------------------------------------------------------------------
| | |
| RSPFN | Flag indicating more spool file information: |
| | |
| | R--$STDIN input spool file is restartable (;RESTART). |
| | |
| | S--SPSAVE specified. |
| | |
| | P--a private (protected) spool file. |
| | |
| | F--special forms messages attached. File will print on a special |
| | form. |
| | |
| | N--spool file incomplete (insufficient disk space or system aborted |
| | during file creation). |
| | |
--------------------------------------------------------------------------------------------
| | |
| OWNER | user.account in the !JOB command of the job file for a $STDLIST or |
| | $STDIN. Generally, the user.account that originated the file or |
| | generated the output. |
| | |
--------------------------------------------------------------------------------------------
Where spool files are kept
MPE/iX has one system account that holds most commonly generated spool
files: HPSPOOL. Input spool files are found in the IN group. Output
spool files are found in the OUT group.
--------------------------------------------------------------------------------------------
| |
| Q3-34 How many files are associated with JOB1? What are they called? |
| |
| |
--------------------------------------------------------------------------------------------
More detailed information about your spool files is available with the
;DETAIL option of the LISTSPF command. To display more information about
the output file #O1585, enter the LISTSPF command this way:
LISTSPF #O1585;DETAIL
You do not have to include #. You can leave out the O, too, since that
merely identifies the file as an output file.
Your display should now look something like this:
________________________________________________________________________________
| |
| |
| SPOOLID JOBNUM FILEDES PRI COPIES DEV STATE RSPFN OWNER |
| FORMID JOBNAME COPSRM SECTS RECS PAGES DATE TIME |
| |
| #O1585 J172 $STDLIST LP 1 LP CREATE USER1.ACCT1 |
| JOB1 1 2048 0 |
| |
| INPUT SPOOL FILES OUTPUT SPOOL FILES |
| ACTIVE = 0; CREATE = 1; READY = 0; |
| OPEN = 0; DEFER = 0; SELECTED = 0; |
| READY = 0; DELPND = 0; SPSAVE = 0; |
| PRINT = 0; XFER = 0; |
| PROBLM = 0; |
| |
| TOTAL IN FILES = 0; TOTAL OUT FILES = 1; |
| IN SECTORS = 0; OUT SECTORS = 2048; |
| |
| OUTFENCE = 4 |
| OUTFENCE = 4 FOR LDEV 6 |
| |
________________________________________________________________________________
The LISTFSP ;DETAIL display shows a second line of headings and new
information. Note the following new headings:
---------------------------------------------------------------------------------------------
| | |
| Heading | Definition |
| | |
---------------------------------------------------------------------------------------------
| | |
| FORMID | Identifies and special forms needed to print this file |
| | |
---------------------------------------------------------------------------------------------
| | |
| JOBNAME | Job name of the job that created the spool file |
| | |
---------------------------------------------------------------------------------------------
| | |
| COPSRM | Copies of the file remaining to be printed |
| | |
---------------------------------------------------------------------------------------------
| | |
| SECTS | Total number of disk sectors used by the spool file |
| | |
---------------------------------------------------------------------------------------------
| | |
| RECS | Total number of records in the spool file |
| | |
---------------------------------------------------------------------------------------------
| | |
| PAGES | Number of physical pages in the spool file (the ~ indicates an |
| | approximate number) |
| | |
---------------------------------------------------------------------------------------------
| | |
| DATE | Date when the spool file became READY |
| | |
---------------------------------------------------------------------------------------------
| | |
| TIME | Time when the spool file became READY |
| | |
---------------------------------------------------------------------------------------------
For JOB1, $STDLIST should be READY when approximately 13144 lines have
been written to it (all CHANGEs complete). At this point, do a LISTSPF,
and an entry for EDTLIST may appear:
_____________________________________________________________________________
| |
| |
| SPOOLID JOBNUM FILEDES PRI COPIES DEV STATE RSPFN OWNER |
| |
| #O1585 J172 EDTLIST 8 1 LP READY USER1.ACCT1 |
| #O1585 J172 $STDLIST 1 1 LP CREATE USER1.ACCT1 |
| |
| INPUT SPOOL FILES OUTPUT SPOOL FILES |
| ACTIVE = 0; CREATE = 1; READY = 1; |
| OPEN = 1; DEFER = 0; SELECTED = 0; |
| READY = 0; DELPND = 0; SPSAVE = 0; |
| PRINT = 0; |
| PROBLM = 0; |
| |
| TOTAL IN FILES = 1; TOTAL OUT FILES = 2; |
| IN SECTORS = 36; OUT SECTORS = 3205; |
| |
| OUTFENCE = 7 |
| OUTFENCE = 7 FOR LDEV 6 |
| |
_____________________________________________________________________________
EDTLIST EDTLIST is the editor's formal file designator for the offline
listing of the modified file. It will disappear from the spool
file listing after the text of MYFILE1 has printed.
To see if the job processed normally, look at the $STDLIST file (job
listing). It shows you how the CHANGE commands operated on each line of
MYFILE:
Using PRINT to check for errors
You may use the PRINT command to examine the contents of a spool file.
Output spool files (begin with O--the letter "oh"--followed by digits).
To examine a spool file with the PRINT command,
PRINT spoolid.OUT.HPSPOOL
For example, to examine the spool file #O1585 shown above, you would
enter:
PRINT O1585.OUT.HPSPOOL
Remember that the O is the letter "oh" and not a zero.
NOTE PRINT may warn you that it has truncated some of the lines in the
spool file as it displays the file. Don't be concerned. Nothing
is being ruined.
PRINT displays the first 23 lines of the file and pauses.
It shows the number of the next line to be displayed and the number of
the last line in the file; and it asks if you want to continue with the
display.
You see something like this on the bottom line of your screen:
_______________________________________
| |
| |
| (24/340) Continue? |
| |
_______________________________________
The next line to be shown is 24. The last line that can be displayed is
340.
Press RETURN each time you want to see another 23 lines of the file.
If instead you want to see a particular line, enter that line number and
press Return:
_______________________________________
| |
| |
| (24/340) Continue? 301Return |
| |
_______________________________________
In this example, PRINT displays line 301 and the next 22 lines following
it.
You can jump forward by 40 lines by entering +40; or jump backward by 40
lines by entering -40.
If you do not want to see more of the file, enter N (for No) and press
Return.
NOTE Most commonly generated output spool files are found in
OUT.HPSPOOL. Most commonly generated input spool files are found in
IN.HPSPOOL. There are other kinds of spool files (called unlinked
spool files) that may reside in other accounts and groups. Highly
experienced users sometimes have need of creating unlinked spool
files for special purposes.
At the top of the file, you see several lines identifying the job and its
characteristics. Next comes your system's welcome message, followed by
the command lines that were executed. If the job produced errors or
warnings, they will be in the file, too. At the bottom, you should see a
message indicating whether or not the job ran successfully.
______________________________________________
| |
| |
| /K MYFILEM |
| YES |
| L ALL, OFFLINE |
| *** OFFLINE LISTING BEGUN *** |
| EXIT |
| END OF SUBSYSTEM |
| :TELL USER USERx.ACCTx JOB1 IS DONE!! |
| |
______________________________________________
The $STDLIST spool file for your job normally goes to the printer, unless
you have set the output priority at or below the current outfence value.
In JOB1 the output priority is set below the outfence value, to prevent
the spool file from printing. Once it prints, it will disappear, unless
you have included the ;SPSAVE option on the !JOB command line.
Notice the STATE of the $STDLIST after you've accessed it and listed it.
Figure 3-7. Spool Files
EDTLIST Output from the Editor
Normally, if serious errors were indicated in $STDLIST, you would purge
the spool file, return to the original job file, and correct the lines
that were specified in the job listing. Then you would stream the job
again.
Because the warnings were not serious (truncations), you need not correct
them.
NOTE You cannot use PRINT or the editor to look at the input spool file
($STDIN), since it is a private spool file.
--------------------------------------------------------------------------------------------
| |
| Q3-35 What is the priority of the JOB1's $STDLIST spool file? Is it above or |
| below the OUTFENCE? |
| |
| |
--------------------------------------------------------------------------------------------
NOTE If you have forgotten the spoolid number, enter LISTSPF to display
all the spoolid numbers.
To print the spool file, alter the priority so that it is above the
OUTFENCE. Enter:
SPOOLF filenumber;ALTER;PRI=9
You have just altered the output priority from 5 (below the OUTFENCE), to
9 (above the OUTFENCE), and the file should be ready to print.
LISTSPF filenumber
If the state is PRINT, it is printing. If the state is READY, is not
printing.
Continue checking the status.
--------------------------------------------------------------------------------------------
| |
| Q3-36 What happens when the spool file is no longer active on the printer? |
| |
| |
--------------------------------------------------------------------------------------------
As you may have noticed, the PRINT command gives you a way to determine
if your processed job file had any errors.
Use LISTSPF again to see if there are any remaining spool files
associated with your job. Purge any remaining spool files by entering
the following command:
SPOOLF filenumber;DELETE
WARNING SPOOLF is a powerful command. Be certain of what you are doing
when you use it.
If you have AM capability, SPOOLF @;DELETE will delete all of
the spool files in the account.
If you have SM or OP capability, or if you are working at the
console, SPOOLF @;DELETE will delete all spool files on the
system.
To restrict the deletion to the spool file of a particular user and
account, use this form:
SPOOLF @;SELEQ=[OWNER=user.account];DELETE
You must enter the left and right brackets as part of the command. The
SELEQ=[...] option works for SPOOLF as well as for LISTSPF. LISTSPF is a
"safe" command: it can do no harm if you misuse it. SPOOLF without
SELEQ=[...] is capable of ruining your spool files and those of others.
Use caution.
To purge more than one spool file, use:
SPOOLF (filenumberone, filenumber...);SELEQ=[OWNER=user.account];DELETE.
You must enclose a list of filenumbers in parentheses to delete the spool
files simultaneously.
You cannot delete input spool files.
Good housekeeping dictates that you clean up your spool files. Usually
system management will purge spool files whose priority is less than a
certain value each night. In case this doesn't happen, you should purge
spool files periodically.
If you have any other spool files in the READY state, purge them now.
Aborting jobs
What happens if you check a job's progress, and decide that the job has a
serious problem? Unfortunately, you cannot use the editor at that point
to examine the error/job listing when the job is still executing and its
listing spool file is in the CREATE (not READY) state; however, you can
use PRINT O<filenumber>.OUT.HPSPOOL to display the spool file while it is
still in the CREATE state.
In this situation, you should immediately lower the priority so that the
job listing will not print. This will give you time to examine the job
listing to determine what went wrong, without printing the erroneous
file.
Then use ABORTJOB to stop the execution of the job. This allows its
$STDIN spool file to become READY. If the spool file was originally
deferred, it still will not print, so no paper resources will be wasted.
The $STDLIST of an aborted job always prints unless its priority is below
the OUTFENCE.
To practice this process, complete the following exercise.
Exercise 3-4: aborting a job and using print.
1. STREAM JOB2. This job modifies MYFILEM. This file contains some
lengthy records that produce truncation errors that don't affect
printing.
2. Use the PRINT command to access and view the job listing
associated with JOB2. (Do so before the job has completed.) What
happens?
3. Now, alter the priority to 5.
SPOOLF filenumber;ALTER;PRI=5
a. What would happen if you did not alter the priority?
b. Let the job finish executing.
c. Can you now access and view the job listing with the PRINT
command?
d. What message appears at the end of the job listing?
4. Check the status of the job. Use LISTSPF with the $STDLIST
spoolid number:
LISTSPF filenumber
What is the state of the spool file now that the job has been
aborted?
5. Get rid of any remaining jobs and spool files.
Figure 3-8. SPOOLF and Aborted Jobs
EDTLIST Output from the Editor
Typically at this point, you would note where errors occurred.
You could then purge the spool files, return to the editor, and
make the necessary corrections to your job file. Please purge any
remaining output spool files now:
SPOOLF @;SELEQ=[OWNER=USERx.ACCTx];DELETE
_________________________________________________________________
WARNING SPOOLF is a powerful command. Be certain of what you are
doing when you use it.
If you have AM capability, SPOOLF @;DELETE will delete
all of the spool files in the account.
If you have SM or OP capability, or if you are working at
the console, SPOOLF @;DELETE will delete all spool files
on the system.
_________________________________________________________________
6. Check to see if you have any additional spool files (LISTSPF @).
These are probably associated with previously suspended or
scheduled jobs. Please purge them now. If any $STDIN files
remain, abort their associated jobs.
********** End of Exercise 3-4 **********
Any time you create a jobfile and STREAM it, use the LISTSPF and PRINT to
monitor its progress and check for processing errors.
Lesson summary
1. The contents of a typical LISTSPF display include these:
a. spoolid number
b. job number
c. file name
d. state of spool file
e. device (or device class) on which file is to be printed
f. output priority
g. owner of the spool file
h. using the ;DETAIL option provides more information on your
spool file(s)
2. All jobs create two kinds of spool files:
a. input file ($STDIN)
b. job listing file ($STDLIST)
There are other kinds of spool files, but these two are basic to
all jobs.
3. The common commands used to display and manage spool files are:
a. The LISTSPF command shows all spool files associated with
your logon user and account.
b. The LISTSPF filenumber command monitors the progress of a
particular spool file.
c. The PRINT command displays the job listing to help you
determine if the job file contained errors.
d. The SPOOLF filenumber;DELETE command purges spool files.
e. The ABORTJOB command aborts a job and causes its job
listing to enter the READY state.
f. The SPOOLF filenumber;ALTER;PRI=outpri command changes the
output priority associated with a spool file.
g. The SPOOLF filenumber;DELETE command deletes the specified
spool file.
WARNING SPOOLF is a powerful command. Be certain of what you are doing
when you use it.
If you have AM capability, SPOOLF @;DELETE will delete all of
the spool files in the account.
If you have SM or OP capability, or if you are working at the
console, SPOOLF @;DELETE will delete all spool files on the
system.
MPE/iX 5.0 Documentation