Using HP 3000 MPE/iX:\Advanced Skills Tutorial: HP 3000 MPE/iX Computer Systems > Chapter 4 Module 3: Batch ProcessingLesson 4 Monitoring Jobs |
|
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. 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.
First, you must stream a job so that a spool file is created. Enter the following command to execute JOB1, which modifies a file:
(Note the job number that is displayed: #Jxxx.) To look at the output (going to the printer) spool files for your user.account, enter:
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.
Note the files associated with the JOB1 job number. In this example, the JOB1 job number is #J172. 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.
To see a listing of spool files belonging to other users, use this form:
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.
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.
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:
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:
The LISTFSP ;DETAIL display shows a second line of headings and new information. Note the following new headings:
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:
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: 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,
For example, to examine the spool file #O1585 shown above, you would enter:
Remember that the O is the letter "oh" and not a zero.
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:
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:
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.
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.
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. 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.
To print the spool file, alter the priority so that it is above the OUTFENCE. Enter:
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.
If the state is PRINT, it is printing. If the state is READY, is not printing. Continue checking the status.
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:
To restrict the deletion to the spool file of a particular user and account, use this form:
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:
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. 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.
********** 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.
|