SFPURGER LOGyynnn File

Content and Purpose. The LOG file provides a record of console messages and spool file processing activities, and some tabulations summarizing the spool file maintenance for the run. Using the LOG file you can track SFPURGER’s progress as it executed. If SFPURGER failed, you can determine the point of failure from the progress and error messages listed in the LOG file.

Tracking SFPURGER Processing. When SFPURGER runs, it first processes your OPTIONS file, if you created one. At the same time, SFPURGER begins writing to the LOG file a list of the progress messages sent to sysop like those shown in Figure 1.

Next, SFPURGER processes the CONTROL file. As it does, SFPURGER assigns a reason code to each valid keyword/action statement. A reason code is just a way to reference a spool file action with a number. SFPURGER assigns reason codes to your CONTROL file statements in order from the top down: The first keyword/action statement receives reason code 1, the second statement receives reason code 2, and so on. SFPURGER then lists in the RUN (or TST) file each keyword/action statement together with its assigned reason code like those shown in Figure 1.

To ensure no spool file gets missed during a run, SFPURGER adds a catch-all entry to its control file processing. This entry appears as the last reason code in the reason code list. The catch-all entry assigns an IGNORE action to any spool file not handled by one of the control file statements.

Citing numbers from the reason code list, SFPURGER justifies the action it intends to take on every spool file in the current run. This information appears in a spool file actions table, which follows the reason code list in the RUN (or TST) file.

Next, actual spool file maintenance is performed, as directed by the RUN file. (With a TST file, spool file maintenance that would have occurred is noted, but not performed.) As each spool file action is executed (or noted), SFPURGER writes to the LOG file the action it took (or would have taken). IGNORE actions are not logged, however. Only records of spool files that actually changed (or that would have changed) during processing are written to the LOG file.

Finally, SFPURGER performs some tabulations. At the end of the LOG file SFPURGER records the total number of spool files processed in the current run, and of these, the number of files that have (or would have) been purged, changed, or presented to exit routines (your SFPXnnnn routines). These tabulations provide a short summary of the spool file maintenance that occurred (or that would have occurred) during the run.

Destination. The LOG file is saved on the A-disk or directory of the virtual machine running SFPURGER, until erased by some later SFPURGER run. (See the KEEPDAY option in Table 1 for details about output file erasure.)

The LOG file is saved in packed format, and may have to be unpacked before it can be viewed (for information about the packed format, see COPYFILE). The LOG file is also sent to the user ID specified by the CONSOLE option in the options file.

Here is a sample SFPURGER LOGyynnn file produced in RUN mode:

Figure 1. Sample SFPURGER LOG yynnn File. The pointers that appear in bold type in this figure are for your reference only; they are not part of the file itself.
**                                **                                  **
**                       SFPURGER Console Log                         **
**         Created by z/VM 5741-A09     10 Feb 2001   18:30:09
**                          ADMIN at CENTRAL                          **
**                                **                                  **

SFPURGER OPTIONS file processed …                         ◄ Progress Messages
SFPURGER starting at 18:29:59 on 10 Feb 2001
Running in RUN Mode - RUN01041
Using SFPURGER MODULE with SFPURGER CONTROL file
Erasing old output files till 01038

Control card scan complete.

Examining output file …                                   ◄ Spool File Processing
Spool file scanning begins ...
Executing: CP PURGE MAINT PRT 0022
0001 FILE  PURGED
Executing: CP PURGE MAINT PUN 0030
0001 FILE  PURGED
Executing: SFPX01 *SFPX DEMO1 RDR 0014
0001 FILE  TRANSFERRED
Executing: CP CHANGE DEMO2 PRT 0019 HOLD
0001 FILE  CHANGED
Executing: CP CHANGE DEMO2 PRT 0021 HOLD
0001 FILE  CHANGED
2 of the 8 spool files HAVE been purged                       ◄ Summary/Tabulations
2 of the 8 spool files HAVE been changed
1 of the 8 spool files HAVE been handled by user exits

A LOG file produced in TEST or TESTSOS mode will differ slightly from the LOG file in Figure 1, which was produced in RUN mode. Some differences: Because no spool file maintenance is actually performed during TEST and TESTSOS modes, in their LOG files a progress message will say Output files are not erased in TEST mode, and their processing statements will say SFPURGER is only Testing rather than Executing spool file actions. In addition, their summary tabulations will show the spool file actions that WOULD have been done (in RUN, FORCE, or SOS mode), rather than the actions that HAVE been done, as in Figure 1.