LOGGER can create, update, and generate reports from a year-to-date totals file. These options are invoked by specifications in the OPTION command. Refer to “OPTION Command” for more information.
The year-to-date totals file has a structure that is implicitly defined by the report specifications used to create it. Each record corresponds to a change in a control break item and contains those totals or averages that were generated at that point.
For example, if the year-to-date file was created by a report that specified USERCODE and CHARGECODE as control break items and totaled processor time, I/O time, elapsed time, and charges, each record in the year-to-date totals file would correspond to one combination of usercode and chargecode and would contain the previously mentioned totals.
Because the structure of the report determines the structure of the file, any report can be used to create the file initially. However, after this initial file creation, all updates must be performed by either the same report or a report with the same control break items and totals. If the program detects that the report being used to update the year-to-date file has a different structure than that file, it does not perform the update and issues an error message.
The internal name of the year-to-date file is YTDFILE. The YTDFILE file can be file-equated. When LOGGER is run with the UPDATE option enabled, it first checks to see if the file already exists. Refer to “OPTION Command” for information about the UPDATE option. If the file exists, it is updated; otherwise, a new file is created.
Only the totals for the last specified control break item are kept in the file. For example, if the report used to create the file had the following BREAK commands, then only totals for ELAPSEDTIME would be kept in the year-to-date totals because ELAPSEDTIME is the only item specified at the innermost level:
BREAK ON USERCODE TOTALING PROCESSTIME, IOTIME BREAK ON CHARGECODE TOTALING ELAPSEDTIME
Year-to-Date File Updates
When the year-to-date file is updated, no existing records are modified, and new records are added at the end of the file. At the time that the year-to-date report is generated, the program locates all records concerning the same combination of control break items and totals all of the appropriate totaled items at that time. Each record in the file contains the date on which that record was added to the file, which makes it possible to determine what changes were made on each update to the year-to-date totals. The date stored in the YTDFILE record is in Julian form (yyddd) to enable the year-to-date file to run longer than one calendar year.
When the report is generated, the heading start date is extracted from the first data record in the YTDFILE as the start date. The date from the last record is extracted as the stop date. If no YTDFILE exists, then the start and stop dates default to the current date.
Year-to-Date Totals File Format
Year-to-Date Record 1 Format through Year-to-Date Record 3 Format illustrate the file format of record numbers 1 through 3.
Record number 1 contains 60 words of control break item descriptions, as shown in Year-to-Date Record 1 Format.
Word |
Information |
---|---|
0 |
NB (Number of control break items) |
1 through 58 |
IDX (IDTABLE index) |
|
LEN (Length of item in characters) |
|
STRT (Starting character position in the file) |
59 |
SF (Source file) |
|
0 (JOBSUMMARY file) |
|
1 (STATISTICS file) |
|
2 (FILEIODATA file) |
Record number 2 contains the totaled item descriptions shown in Year-to-Date Record 2 Format.
Word |
Information |
---|---|
0 |
NT (Number of totaled items) |
1 through 58 |
IDX (IDTABLE index) |
|
LEN (Not used) |
|
STRT (Start position or word index) |
|
TAF (0 if item is totaled, 1 if averaged) |
Record number 3 contains the item descriptions shown in Year-to-Date Record 3 Format.
Word |
Information |
---|---|
n |
BI (Control break items—character strings) |
|
TI (Totaled control break item binary values) |
|
C (Count number of entries from which totals were obtained) |
|
D (Date) |