Trailing-Edge
-
PDP-10 Archives
-
bb-d549g-sb
-
avail.cbl
There are no other files named avail.cbl in the archive.
IDENTIFICATION DIVISION.
PROGRAM-ID. AVAIL.
AUTHOR. LARRY EMLICH, DIGITAL EQUIPMENT CORPORATION.
INSTALLATION. M.E.G. MARLBORO, MA.
DATE-WRITTEN. APRIL 10,1979
DATE-COMPILED.
REMARKS. VERSION 2(30)
GENERATES AVAILABILITY REPORT FROM FILE CREATED BY DAEMON
(AVAIL.SYS). USES REDERR (A MACRO SUBROUTINE) TO TRANSLATE
THE FILE INTO A COBOL-READABLE FORMAT.
COPYRIGHT (C) 1980 BY
DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE
AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS
SOFTWARE OR ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR
OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. NO TITLE TO
AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
CORPORATION.
DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF
ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
^^REVISION HISTORY
-------- -------
EDIT # COMMENT
1 FIX RIGHT-MOVE WHEN WORD IS EXACTLY SIX CHARACTERS
2 SAVE-NEW-REL INCORRECTLY ALTERING CRASH TIME
3 CHANGE REDERR TO KEEP SIGN ON DATE/TIME CHANGE
4 REWRITE DEVICE STATUS CHANGE TO CONSIDER DATE/TIME CHANGES
5 ADD RESPONSE TO HELP
6 CLEAN UP LISTING, USE LOWER CASE, ALIGN DECIMAL POINTS
7 ADD DETAILED LISTING FOR RELOAD AND DEVICE CHANGES
10 ACCUMULATE TIMES TO 3 DECIMAL PLACES
11 ADD CHECKS FOR BACKWARDS TIMES
12 DON'T TELL USER TO SUPPLY OUTPUT DEVICE. ALLOW DSK TO BE ONE
13 CLEAN UP OUTPUT -- DO BETTER PAGING IN MAIN REPORT
14 REDERR NOT IGNORING FIRST FIVE BLOCKS OF AVAIL FILE!
15 ADD MULTI-WEEK, MULTI-REPORT WITH NEW DIALOG (INCLUDING HELP)
16 EFFECTIVENESS FIGURES TOO PESSIMISTIC -- ALLOW 100%
17 MINIMUM TIMES NOT WORKING IF NEW TIME IS ZERO
20 MAKE NAMES MORE MEANINGFUL AND USE STRUCTURED TECHNIQUES
(FOR VERSION 2)
21 REDERR UNIVERSAL TIME CONVERSION 7 MINUTES OFF
22 FIX WARNING MESSAGES
23 FIX REDERR BUG WHEN AVAIL IS TWOSEG
24 INCREASE DEVICE STATUS CHANGE STORAGE
25 ADHERE TO ANSI STANDARDS FOR 88 VAULES
26 FIX HANDLING OF PPNS WITH NO LEADING ZEROS
27 IF DEVICE NOT SPECIFIED BUT PPN IS, USE 'DSK' FOR DEFAULT
30 ADD ABILITY TO RECEIVE BEGIN OR END OF OPERATING CYCLE
[END OF AVAIL.DOC]
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT AVAIL-REPORT, ASSIGN TO DSK, RECORDING MODE IS ASCII.
SELECT RELOAD-DETAIL, ASSIGN TO DSK, RECORDING MODE IS ASCII.
SELECT DEVICE-DETAIL, ASSIGN TO DSK, RECORDING MODE IS ASCII.
DATA DIVISION.
FILE SECTION.
FD AVAIL-REPORT, VALUE OF ID IS REPORT-FILE, REPORT IS AVAIL-RPT.
01 REPORT-LINE PIC X(132).
FD RELOAD-DETAIL, VALUE OF ID IS RELOAD-FILE, REPORT IS RELOAD-DETAIL-RPT.
01 REL-DET-LINE PIC X(132).
FD DEVICE-DETAIL, VALUE OF ID IS DEVICE-FILE, REPORT IS DEVICE-DETAIL-RPT.
01 DEV-DET-LINE PIC X(132).
WORKING-STORAGE SECTION.
01 REPORT-FILE.
02 RPT-FILE-NAME PIC X(6) VALUE 'AVAIL'.
02 RPT-FILE-EXT.
03 RPT-EXT-1 PIC X VALUE 'R'.
03 RPT-EXT-LAST.
04 RPT-EXT-2 PIC X VALUE 'P'.
04 RPT-EXT-3 PIC X VALUE 'T'.
01 FILE-EXTENSION-MODIFIERS.
02 EXTENSION-CHECK PIC 99.
88 MAXIMUM-EXTENSION VALUE 80.
02 LAST-EXT-NUMBER PIC 99.
02 MISSING-EXT-COUNT PIC 99.
01 RELOAD-FILE.
02 REL-FILE-NAME PIC X(6) VALUE 'AVAIL'.
02 REL-FILE-EXT PIC XXX VALUE 'DE1'.
01 DEVICE-FILE.
02 DEV-FILE-NAME PIC X(6) VALUE 'AVAIL'.
02 DEV-FILE-EXT PIC XXX VALUE 'DE2'.
* ALL PROGRAM CONSTANTS KEPT HERE
01 PROGRAM-CONSTANTS.
02 FILE-SPEC-FLAG-SETTINGS.
03 SOURCE-DONE-SET PIC 9 VALUE 1.
03 DEST-DONE-SET PIC 9 VALUE 2.
03 SPEC-UNSTRUNG-SET PIC 9 VALUE 3.
02 REDERR-FUNCTIONS COMP.
03 START-READ PIC S9 VALUE -1.
03 STOP-READ PIC S9 VALUE ZERO.
03 END-OF-FILE-SET REDEFINES STOP-READ PIC S9.
03 NEXT-READ PIC S9 VALUE 1.
03 GET-UDT-FUNCTION PIC S9 VALUE 3.
03 LOOK-FILE PIC S9 VALUE -3.
02 ARRAY-CONSTANTS.
* LAST ROW OF MONITOR RELOAD STACK
03 RM PIC 999 VALUE 102.
* LAST ROW OF DEVICE STATISTICS STACK
03 DM PIC 999 VALUE 100.
* LAST ROW OF DEVICE STATUS CHANGE STACK
03 CM PIC 9999 VALUE 1000.
* LAST ROW OF STOPCODE STACK
03 SM PIC 999 VALUE 101.
02 SEARCH-TABLES.
03 MONTH-NAME-TABLE.
04 FILLER PIC XXX VALUE 'JAN'.
04 FILLER PIC XXX VALUE 'FEB'.
04 FILLER PIC XXX VALUE 'MAR'.
04 FILLER PIC XXX VALUE 'APR'.
04 FILLER PIC XXX VALUE 'MAY'.
04 FILLER PIC XXX VALUE 'JUN'.
04 FILLER PIC XXX VALUE 'JUL'.
04 FILLER PIC XXX VALUE 'AUG'.
04 FILLER PIC XXX VALUE 'SEP'.
04 FILLER PIC XXX VALUE 'OCT'.
04 FILLER PIC XXX VALUE 'NOV'.
04 FILLER PIC XXX VALUE 'DEC'.
03 MONTH-NAME REDEFINES MONTH-NAME-TABLE PIC XXX OCCURS 12 TIMES.
03 GOOD-RELOAD-TYPES.
04 FILLER PIC X(6) VALUE 'POWER'.
04 FILLER PIC X(6) VALUE 'STATIC'.
04 FILLER PIC X(6) VALUE 'OPR'.
04 FILLER PIC X(6) VALUE 'PM'.
04 FILLER PIC X(6) VALUE 'NEW'.
04 FILLER PIC X(6) VALUE 'SCHED'.
04 FILLER PIC X(6) VALUE 'SA'.
04 FILLER PIC X(6) VALUE 'OTHER'.
03 GOOD-RELOAD-TABLE REDEFINES GOOD-RELOAD-TYPES
OCCURS 8 TIMES, INDEXED BY G, PIC X(6).
03 BAD-RELOAD-TYPES.
04 FILLER PIC X(6) VALUE 'STOPCD'.
04 FILLER PIC X(6) VALUE 'HALT'.
04 FILLER PIC X(6) VALUE 'PARITY'.
04 FILLER PIC X(6) VALUE 'HARDWA'.
04 FILLER PIC X(6) VALUE 'NXM'.
04 FILLER PIC X(6) VALUE 'HUNG'.
04 FILLER PIC X(6) VALUE 'LOOP'.
04 FILLER PIC X(6) VALUE 'CM'.
03 BAD-RELOAD-TABLE REDEFINES BAD-RELOAD-TYPES
OCCURS 8 TIMES, INDEXED BY B, PIC X(6).
03 SUBSYS-TYPES.
04 FILLER PIC X(6) VALUE 'CPU'.
04 FILLER PIC X(6) VALUE 'MEM'.
04 FILLER PIC X(6) VALUE 'COMM'.
04 FILLER PIC X(6) VALUE 'DISK'.
04 FILLER PIC X(6) VALUE 'TAPE'.
04 FILLER PIC X(6) VALUE 'UNKNWN'.
03 SUBSYS-TABLE REDEFINES SUBSYS-TYPES
OCCURS 6 TIMES, INDEXED BY SU, PIC X(6).
03 REPORT-OVERHEAD-LINES.
04 FILLER PIC 9 VALUE ZERO.
04 FILLER PIC 9 VALUE 7.
04 FILLER PIC 9 VALUE 7.
04 FILLER PIC 9 VALUE 4.
04 FILLER PIC 9 VALUE 4.
03 OVERHEAD-LINES REDEFINES REPORT-OVERHEAD-LINES
OCCURS 5 TIMES PIC 9.
* CONTROL FLAGS ALL KEPT HERE
01 CONTROL-FLAGS.
02 BEGIN-SEEN-FLAG PIC X VALUE 'N'.
88 BEGIN-SEEN VALUE 'Y'.
02 END-SEEN-FLAG PIC X VALUE 'N'.
88 END-SEEN VALUE 'Y'.
02 INVALID-DATE-FLAG PIC X.
88 INVALID-DATE VALUE 'Y'.
02 FILE-MISSING-FLAG PIC X.
88 FILE-MISSING VALUE 'Y'.
02 FILE-SPEC-FLAG PIC 9.
88 SOURCE-DONE VALUE 1.
88 DESTINATION-DONE VALUE 2.
88 SPEC-UNSTRUNG VALUE 3.
02 SPEC-OK-FLAG PIC X VALUE 'N'.
88 SPEC-OK VALUE 'Y'.
02 STATS-OK-FLAG PIC X VALUE 'Y'.
88 STATS-OK VALUE 'Y'.
02 ALL-DONE-FLAG PIC X VALUE 'N'.
88 ALL-DONE VALUE 'Y'.
02 STOPCODES-SORTED-FLAG PIC X.
88 STOPCODES-SORTED VALUE 'Y'.
* CONTROL SWITCHES ALL KEPT HERE
01 CONTROL-SWITCHES.
02 CURRENT-OPTION-SWITCH.
03 OPTION-NUMBER PIC X VALUE 'H'.
88 ONE-WEEK VALUE '1'.
88 MULTI-WEEK VALUE '2'.
88 MULTI-REPORT VALUE '3'.
88 INVALID-OPTION VALUES '0', '4' THRU '9'.
88 HELP-WITH-OPTION VALUES 'A' THRU 'Z', '/','?'.
03 DIALOG-SUB-SWITCH PIC X.
88 SILENT-MODE VALUE 'F'.
02 DATE-LIMITS-SWITCH PIC X VALUE 'H'.
88 DATE-LIMITS VALUE 'Y'.
88 HELP-WITH-DATES VALUES 'H','/','?'.
02 LOG-FILES-SWITCH PIC X VALUE 'H'.
88 LOGS-WANTED VALUE 'Y'.
88 HELP-WITH-LOGS VALUES 'H','?','/'.
* INDEX REGISTERS KEPT HERE
01 INDEX-REGISTERS.
02 SPEC-INDEX PIC 99.
02 REPORT-PHASE PIC 9.
02 STRING-POINTER PIC 99.
* ERROR COUNTERS
01 ERROR-COUNTERS.
02 WARNING-COUNT PIC 9999.
02 BACKWARDS-TIME PIC 999.
02 BAD-RELOAD-CODE PIC 999.
02 RELOAD-OVERFLOW PIC 999.
02 DEVICE-OVERFLOW PIC 999.
02 STOPCODE-OVERFLOW PIC 999.
* IN-DATE IS USED TO FORMAT A DATE SUPPLIED BY OPERATOR
* ALSO USED FOR FORMATTING OUTPUT DATE/TIME
01 IN-DATE-TIME.
02 IN-DATE.
03 IN-YR PIC 99.
88 MAX-YR VALUE 85 THRU 99.
88 MIN-YR VALUE ZERO THRU 78.
03 IN-MO PIC 99.
88 MAX-MO VALUE 13 THRU 99.
88 MIN-MO VALUE ZERO.
03 IN-DAY PIC 99.
88 MAX-DAY VALUE 32 THRU 99.
88 MIN-DAY VALUE ZERO.
02 IN-TIME.
03 IN-HR PIC 99.
03 IN-MI PIC 99.
03 IN-SE PIC 99.
02 VALID-MONTH-TEST.
03 TEST-MO PIC 99.
03 TEST-REM PIC 99.
01 DATE-TIME-STRING-OUT.
02 DATE-STRING-OUT PIC X(9).
02 TIME-STRING-OUT PIC X(8).
* ONCE DATE IS CHECKED IT GOES TO THE FOLLOWING LOCATIONS
01 RPT-BEGIN-DESIRED.
02 DESIRED-YR PIC 99 VALUE ZERO.
02 DESIRED-MO PIC 99 VALUE ZERO.
02 DESIRED-DAY PIC 99 VALUE ZERO.
01 RPT-END-DESIRED.
02 DESIRED-YR PIC 99 VALUE 99.
02 DESIRED-MO PIC 99 VALUE ZERO.
02 DESIRED-DAY PIC 99 VALUE ZERO.
01 FILE-SPEC-LINE.
02 FILLER PIC X.
88 HELP-WANTED VALUES ARE '/','?'.
02 FILLER PIC X(79).
01 HELP-LINE REDEFINES FILE-SPEC-LINE PIC X(80).
88 HELP-TYPED VALUES ARE 'H','HE','HEL','HELP'.
* FILE SPECIFICATION UNSTRINGS INTO THE FOLLOWING BLOCK
01 SPEC-VALUE-DELIMITER OCCURS 15 TIMES.
02 SPEC-VALUE PIC X(6).
02 SPEC-DELIMITER PIC X.
01 SPEC-BLOCK.
02 SPEC-DEVICE PIC X(6).
88 DEVICE-OK VALUES ARE SPACE, 'DSK'.
02 SPEC-FILE-NAME PIC X(6).
02 SPEC-FILE-EXT PIC X(6).
02 SPEC-PROJ PIC 9(6).
02 SPEC-PROG PIC 9(6).
* THE FOLLOWING IS USED TO DISPLAY THE PPN
01 PROJ-PROG-DISPLAY.
02 DISPLAY-PROJ PIC X(6).
02 DISPLAY-PROG PIC X(6).
* THE FOLLOWING IS USED TO RIGHT-JUSTIFY A SIXBIT WORD
01 RIGHT-WORD.
02 RIGHT-CHARACTER OCCURS 6 TIMES PIC X.
01 MOVE-R-INDEXES COMP.
02 FIRST-CHARACTER PIC S9.
02 LAST-CHARACTER PIC S9.
* THE FOLLOWING ARE USED FOR COMPUTING DAYS/JIFFS
01 DAY-JIFF-SUB COMP.
02 DJ-ONE.
03 D-1 PIC S9(6).
03 J-1 PIC S9(6).
02 DJ-TWO.
03 D-2 PIC S9(6).
03 J-2 PIC S9(6).
02 DJ-OUT COMP.
03 D-OUT PIC S9(6).
03 J-OUT PIC S9(6).
* USED BY ROUND-NUMBER ROUTINE
01 ROUND-ONE-TWO.
02 ROUNDER PIC S9(6)V999.
02 ROUNDER-OUT PIC S9(6)V9.
* THE FOLLOWING IS NEEDED TO LOOK AT MONITOR NAME AS ASCII
01 OLD-RELOAD-MON-NAME-SIX PIC X(56).
01 OLD-RELOAD-MON-NAME-ASC REDEFINES OLD-RELOAD-MON-NAME-SIX PIC X(35) DISPLAY-7.
* FOLLOWING ARE LITERALS USED BY THE REPORT SECTION TO
* AVOID DUPLICATION.
01 REPORT-LITERALS DISPLAY-7.
02 RELOAD-LITERAL PIC X(7) VALUE 'Reloads'.
02 EFFECT-LITERAL PIC X(32) VALUE 'affecting measured availability'.
02 MONITOR-LITERAL PIC X(12) VALUE 'MONITOR NAME'.
02 VERSION-LITERAL PIC X(7) VALUE 'VERSION'.
02 TOTAL-LITERAL PIC X(6) VALUE 'TOTALS'.
* AND FOLLOWING ARE THE VARIABLES USED BY THE REPORT SECTION
* FOR DATE/TIME AND SYSTEM STATISTICS
01 REPORT-VARIABLES.
02 RPT-CPU-NUMBER PIC 9(5).
02 RPT-BEGIN-DATE PIC X(9).
02 RPT-END-DATE PIC X(9).
02 LINE-COUNTS.
03 BAD-RELOAD-LINES PIC 999.
03 GOOD-RELOAD-LINES PIC 999.
03 DEVICE-LINES PIC 999.
03 STOPCODE-LINES PIC 999.
03 PHASE-LINES PIC 999.
01 DETAIL-REPORT-VARIABLES.
02 DETAIL-LOAD-DATE PIC X(9).
02 DETAIL-LOAD-TIME PIC X(8).
02 DETAIL-CRASH-DATE PIC X(9).
02 DETAIL-CRASH-TIME PIC X(8).
02 DETAIL-RELOAD-DATE PIC X(9).
02 DETAIL-RELOAD-TIME PIC X(8).
02 DETAIL-DEVICE-DATE PIC X(9).
02 DETAIL-DEVICE-TIME PIC X(8).
02 DETAIL-RELOAD-NUMBER PIC 9(4).
02 DETAIL-DEVICE-ON-OFF PIC XXX.
02 DETAIL-SUBSYS-NAME PIC X(6).
02 DETAIL-TIME-CHANGE PIC S9(5)V9.
02 DETAIL-SUB-TOTAL PIC S9999V999.
* REDERR ARGUMENTS
01 BEGIN-DATE PIC 9(12) VALUE ZERO.
01 END-DATE PIC 9(12) VALUE 990000000000.
01 INPUT-LOCATOR.
02 INPUT-DEVICE PIC X(6) VALUE 'SYS'.
02 IN-FILE-NAME PIC X(6) VALUE 'AVAIL'.
02 IN-FILE-EXT.
03 IN-EXT-1 PIC X VALUE 'S'.
03 IN-EXT-LAST.
04 IN-EXT-2 PIC X VALUE 'Y'.
04 IN-EXT-3 PIC X VALUE 'S'.
02 FILLER PIC X(3).
02 PROJECT-PROGRAMMER.
03 PROJ PIC 9(6).
03 PROG PIC 9(6).
01 REDERR-FUNCTION PIC S9(5) COMP.
01 ENTRY-CODES COMP.
02 CODE-46 PIC S9(5) VALUE 46.
02 CODE-47 PIC S9(5) VALUE 47.
02 CODE-15 PIC S9(5) VALUE 15.
02 CODE-44 PIC S9(5) VALUE 44.
* TEMPORARY LOCATION FOR DEFAULT EXTENSION (WHEN OPTION 1)
01 IN-DEFAULT-EXT PIC XXX.
* FOLLOWING IS THE REDERR SUBROUTINE BUFFER AREA.
* REDERR SEARCHES ERRUNV AND SYRUNV FOR SYMBOL AND MACRO
* DEFINITIONS.
01 ENTRY-BUFFER.
* THIS IS THE TRANSLATED ENTRY HEADER FORMAT
02 ENTRY-HEADER.
03 HEADER-CODE PIC S9(5) COMP.
88 END-OF-FILE VALUE ZERO.
88 NO-FILE VALUE -1.
88 VALID-CODE VALUES 1 THRU 776.
88 STATUS-CHANGE-ENTRY VALUE 15.
88 RELOAD-ENTRY VALUE 44.
88 BEGIN-ENTRY VALUE 46.
88 END-ENTRY VALUE 47.
03 HEADER-DATE-TIME COMP.
04 HEADER-STAMP-DAYS PIC S9(6).
04 HEADER-STAMP-JIFFS PIC S9(6).
03 HEADER-DATE-TIME-SIXBIT.
04 HEADER-DATE-SIXBIT.
05 HEADER-YR PIC 99.
05 HEADER-MO PIC 99.
05 HEADER-DA PIC 99.
04 HEADER-CLOCK-SIXBIT.
05 HEADER-HR PIC 99.
05 HEADER-MI PIC 99.
05 HEADER-SE PIC 99.
03 HEADER-UPTIME COMP.
04 HEADER-UP-DAYS PIC S9(6).
04 HEADER-UP-JIFFS PIC S9(6).
03 HEADER-UP-SIXBIT.
04 HEADER-UP-DAYS-SIXBIT PIC X(6).
04 HEADER-UP-CLOCK-SIXBIT.
05 HEADER-UP-HRS PIC 99.
05 HEADER-UP-MIN PIC 99.
05 HEADER-UP-SEC PIC 99.
03 HEADER-CPU-NUMBER PIC S9(5) COMP.
* DEVICE STATUS CHANGE ENTRIES USE THE FOLLOWING FORMAT
02 STATUS-CHANGE.
03 STATUS-DEVICE-NAME.
04 STATUS-DEVNAME-1 PIC X.
04 FILLER PIC XXXXX.
03 REDEF-NAME-ONE REDEFINES STATUS-DEVICE-NAME.
04 FILLER PIC XXX.
88 STATUS-CPU-OR-MEM VALUES ARE 'CPU','MEM'.
04 RIGHT-HALF-NAME PIC XXX.
03 STATUS-NAME-TWO PIC X(6).
03 STATUS-COMMAND PIC S9(5) COMP.
88 STATUS-ATTACH VALUE 0.
88 STATUS-DETACH VALUE 1.
88 STATUS-XCHANGE VALUE 2.
88 STATUS-DT-CHANGE VALUE 3.
88 STATUS-CPU-OFF VALUE 4.
88 STATUS-CPU-ON VALUE 5.
88 STATUS-NODE-OFF VALUE 6.
88 STATUS-NODE-ON VALUE 7.
88 STATUS-MEM-ON VALUE 8.
88 STATUS-MEM-OFF VALUE 9.
88 STATUS-ON VALUES ARE 0,5,7,8.
88 STATUS-OFF VALUES ARE 1,4,6,9.
88 STATUS-NODE VALUES ARE 6,7.
03 STATUS-DT-CHANGE-VALUE COMP.
04 STATUS-DAY-CHANGE PIC S9(6).
04 STATUS-TIME-CHANGE PIC S9(6).
03 STATUS-REASON PIC X(6).
03 FILLER PIC X(114).
* RELOAD ENTRIES USE THE FOLLOWING FORMAT
02 NEW-RELOAD-DATA REDEFINES STATUS-CHANGE.
03 NEW-RELOAD-MONITOR-NAME PIC X(54).
03 NEW-RELOAD-FILL-VERSION.
04 FILLER PIC X(7).
04 NEW-RELOAD-VERSION PIC X(5).
03 NEW-RELOAD-UPTIME COMP.
04 NEW-RELOAD-UP-DAYS PIC S9(6).
04 NEW-RELOAD-UP-JIFFS PIC S9(6).
03 NEW-RELOAD-UP-SIXBIT.
04 NEW-RELOAD-UP-DATE.
05 NEW-RELOAD-UP-YR PIC 99.
05 NEW-RELOAD-UP-MO PIC 99.
05 NEW-RELOAD-UP-DAY PIC 99.
04 NEW-RELOAD-UP-CLOCK.
05 NEW-RELOAD-UP-HR PIC 99.
05 NEW-RELOAD-UP-MI PIC 99.
05 NEW-RELOAD-UP-SE PIC 99.
03 NEW-RELOAD-CRASH COMP.
04 NEW-RELOAD-CRASH-DAYS PIC S9(6).
04 NEW-RELOAD-CRASH-JIFFS PIC S9(6).
03 NEW-RELOAD-CRASH-SIXBIT.
04 NEW-RELOAD-CRASH-DATE.
05 NEW-RELOAD-CRASH-YR PIC 99.
05 NEW-RELOAD-CRASH-MO PIC 99.
05 NEW-RELOAD-CRASH-DA PIC 99.
04 NEW-RELOAD-CRASH-CLOCK.
05 NEW-RELOAD-CRASH-HR PIC 99.
05 NEW-RELOAD-CRASH-MI PIC 99.
05 NEW-RELOAD-CRASH-SE PIC 99.
03 NEW-RELOAD COMP.
04 NEW-RELOAD-DAYS PIC S9(6).
04 NEW-RELOAD-JIFFS PIC S9(6).
03 NEW-RELOAD-SIXBIT.
04 NEW-RELOAD-DATE.
05 NEW-RELOAD-YR PIC 99.
05 NEW-RELOAD-MO PIC 99.
05 NEW-RELOAD-DA PIC 99.
04 NEW-RELOAD-CLOCK.
05 NEW-RELOAD-HR PIC 99.
05 NEW-RELOAD-MI PIC 99.
05 NEW-RELOAD-SE PIC 99.
03 NEW-RELOAD-WHY.
04 NEW-RELOAD-WHY-PREFIX PIC XXX.
04 NEW-RELOAD-WHY-STPCOD PIC XXX.
* RELOAD ENTRIES ARE MOVED HERE IN CASE TIME CHANGE CHANGES RELOAD TIME
01 SAVED-RELOAD-ENTRY.
02 OLD-RELOAD-DATA.
03 OLD-RELOAD-MONITOR-NAME PIC X(54).
03 OLD-RELOAD-FILL-VERSION.
04 FILLER PIC X(7).
04 OLD-RELOAD-VERSION PIC X(5).
03 OLD-RELOAD-UPTIME COMP.
04 OLD-RELOAD-UP-DAYS PIC S9(6).
04 OLD-RELOAD-UP-JIFFS PIC S9(6).
03 OLD-RELOAD-UP-SIXBIT.
04 OLD-RELOAD-UP-DATE.
05 OLD-RELOAD-UP-YR PIC 99.
05 OLD-RELOAD-UP-MO PIC 99.
05 OLD-RELOAD-UP-DAY PIC 99.
04 OLD-RELOAD-UP-CLOCK.
05 OLD-RELOAD-UP-HR PIC 99.
05 OLD-RELOAD-UP-MI PIC 99.
05 OLD-RELOAD-UP-SE PIC 99.
03 OLD-RELOAD-CRASH COMP.
04 OLD-RELOAD-CRASH-DAYS PIC S9(6).
04 OLD-RELOAD-CRASH-JIFFS PIC S9(6).
03 OLD-RELOAD-CRASH-SIXBIT.
04 OLD-RELOAD-CRASH-DATE.
05 OLD-RELOAD-CRASH-YR PIC 99.
05 OLD-RELOAD-CRASH-MO PIC 99.
05 OLD-RELOAD-CRASH-DA PIC 99.
04 OLD-RELOAD-CRASH-CLOCK.
05 OLD-RELOAD-CRASH-HR PIC 99.
05 OLD-RELOAD-CRASH-MI PIC 99.
05 OLD-RELOAD-CRASH-SE PIC 99.
03 OLD-RELOAD COMP.
04 OLD-RELOAD-DAYS PIC S9(6).
04 OLD-RELOAD-JIFFS PIC S9(6).
03 OLD-RELOAD-SIXBIT.
04 OLD-RELOAD-DATE.
05 OLD-RELOAD-YR PIC 99.
05 OLD-RELOAD-MO PIC 99.
05 OLD-RELOAD-DA PIC 99.
04 OLD-RELOAD-CLOCK.
05 OLD-RELOAD-HR PIC 99.
05 OLD-RELOAD-MI PIC 99.
05 OLD-RELOAD-SE PIC 99.
03 OLD-RELOAD-WHY.
04 OLD-RELOAD-WHY-PREFIX PIC XXX.
04 OLD-RELOAD-WHY-STPCOD PIC XXX.
* CRASH TIME SAVED IN CASE DAEMON DOESN'T HAVE TIME TO UPDATE
* FILE. IF CRASH TIME DOESN'T CHANGE, USE LAST RELOAD TIME AS
* CURRENT CRASH TIME.
01 LAST-CRASH-DATA.
02 LAST-CRASH COMP.
03 LAST-CRASH-DAYS PIC S9(6).
03 LAST-CRASH-JIFFS PIC S9(6).
02 LAST-CRASH-SIXBIT.
03 LAST-CRASH-DATE.
04 LAST-CRASH-YR PIC 99.
04 LAST-CRASH-MO PIC 99.
04 LAST-CRASH-DAY PIC 99.
03 LAST-CRASH-CLOCK.
04 LAST-CRASH-HR PIC 99.
04 LAST-CRASH-MI PIC 99.
04 LAST-CRASH-SE PIC 99.
* CURRENT RUN/DOWN TIME USED FOR LOG AND SUMS
01 CURRENT-RELOAD-VALUES.
02 THIS-RUN-TIME PIC S9(4)V999.
02 THIS-DOWN-TIME PIC S9(4)V999.
* TIME OF FIRST RELOAD SAVED FOR COMPUTING OPERATING CYCLE
01 OPERATING-CYCLE-VALUESCOMP.
02 OPERATING-CYCLE-START.
03 CYCLE-BEGIN-DAYS PIC S9(6).
03 CYCLE-BEGIN-JIFFS PIC S9(6).
02 OPERATING-CYCLE-END.
03 CYCLE-END-DAYS PIC S9(6).
03 CYCLE-END-JIFFS PIC S9(6).
* NOW DEFINE THE ARRAY OF RELOAD STATISTICS
* EACH RELOAD OR DEVICE ENTRY RESULTS IN UPDATING THESE STATISTICS.
* THERE WILL BE ONE SET OF STATISTICS FOR EACH DIFFERENT MONITOR
* NAME OR MONITOR VERSION.
01 RELOAD-TABLE.
02 RELOAD-STACK OCCURS 102 TIMES, INDEXED BY R.
03 RELOAD-NAME-VERSION.
04 RELOAD-NAME DISPLAY-7 PIC X(35).
04 RELOAD-VERSION-STACKED PIC X(5).
03 GOOD-COUNTS-TIMES.
04 GOOD-COUNTS OCCURS 9 TIMES PIC 9999.
04 GOOD-TIMES OCCURS 9 TIMES PIC S9999V999.
03 BAD-COUNTS-TIMES.
04 BAD-COUNTS OCCURS 9 TIMES PIC 9999.
04 BAD-TIMES OCCURS 9 TIMES PIC S9999V999.
01 DEVICE-STATS-TABLE.
02 DEVICE-STATS OCCURS 100 TIMES, INDEXED BY D.
03 STATS-DEVICE-NAME PIC X(6).
03 STATS-SUBSYS-CODE PIC X.
03 STATS-DEVICE-OUTAGE-COUNT PIC 9(5).
03 STATS-CPU-MEM-ON-COUNT PIC S9(5).
03 STATS-DEVICE-OFF COMP.
04 STATS-DAYS-OFF PIC S9(6).
04 STATS-JIFFS-OFF PIC S9(6).
03 STATS-DEVICE-ON COMP.
04 STATS-DAYS-ON PIC S9(6).
04 STATS-JIFFS-ON PIC S9(6).
03 STATS-DEVICE-OUTAGE-TIME PIC S9(4)V999.
01 SUBSYS-OUT-TABLE.
02 SUBSYS-STACK OCCURS 6 TIMES.
03 SUBSYS-OUTAGE-COUNT PIC 9999.
03 SUBSYS-OUTAGE-TIME PIC S9999V999.
01 E-SAVE PIC S9999.
01 DEVICE-STACK OCCURS 1000 TIMES, INDEXED BY E.
02 DEVICE-STACK-NAME PIC X(6).
02 DEVICE-STACK-TYPE PIC 9.
02 DEVICE-STACK-SUBSYS PIC 9.
02 DEVICE-STACK-ON-OFF COMP.
03 DEVICE-STACK-DAYS PIC S9(6).
03 DEVICE-STACK-JIFFS PIC S9(6).
01 STOPCODE-TEMP PIC X(10).
01 STOPCODE-TABLE.
02 STOPCODE-STACK OCCURS 101 TIMES, INDEXED BY S.
03 STOPCODE-NAME PIC X(6).
03 STOPCODE-COUNT PIC 9999.
* THE ARRAY DATA IS MOVED A ROW AT A TIME TO THE FOLLOWING
* LINE SO THAT THE REPORT SECTION CAN USE IT FOR A SOURCE.
01 RELOAD-OUT-LINE.
02 RELOAD-NAME-VERSION-OUT.
03 RELOAD-NAME-OUT DISPLAY-7 PIC X(35).
03 RELOAD-VERSION-OUT PIC X(5).
02 RELOAD-STATS-OUT.
03 RELOAD-STATS-COUNT.
04 STP-PWR-COUNT PIC 9999.
04 HLT-STAT-COUNT PIC 9999.
04 PAR-OPR-COUNT PIC 9999.
04 HDW-PM-COUNT PIC 9999.
04 NXM-NEW-COUNT PIC 9999.
04 HNG-SCD-COUNT PIC 9999.
04 LUP-SA-COUNT PIC 9999.
04 CM-OTHR-COUNT PIC 9999.
04 RELOAD-TOT-COUNT PIC 9999.
03 RELOAD-STATS-TIME.
04 STP-PWR-TIME PIC S9999V999.
04 HLT-STAT-TIME PIC S9999V999.
04 PAR-OPR-TIME PIC S9999V999.
04 HDW-PM-TIME PIC S9999V999.
04 NXM-NEW-TIME PIC S9999V999.
04 HNG-SCD-TIME PIC S9999V999.
04 LUP-SA-TIME PIC S9999V999.
04 CM-OTHR-TIME PIC S9999V999.
04 RELOAD-TOT-TIME PIC S9999V999.
01 DEVICE-STOPCODE-OUT.
02 DEVICE-STOPCODE-NAME PIC X(6).
02 DEVICE-STOPCODE-NUMBERS.
03 DEVICE-STOPCODE-COUNT PIC 9999.
03 DEVICE-OUTAGE-TIME PIC S9999V999.
* FOLLOWING ARE THE SYSTEM FIGURES PRINTED AT THE BEGINNING
* OF THE REPORT -- INCLUDING THE REPORT OPERATING CYCLE.
01 SYSTEM-STATISTICS.
02 OPERATING-CYCLE PIC S9(5)V9.
02 TOTAL-RUN-TIME PIC S9999V999.
02 TOTAL-RELOADS PIC S9999.
02 SYSTEM-AVAILABILITY PIC S999V9.
02 MAXIMUM-RUN-TIME PIC S9999V9.
02 MAXIMUM-DOWN-TIME PIC S9999V9.
02 TOTAL-DOWN-TIME PIC S9999V999.
02 MEAN-DOWN-TIME PIC S9999V9.
02 USER-AVAILABILITY PIC S999V9.
02 MINIMUM-RUN-TIME PIC S9999V9.
02 MINIMUM-DOWN-TIME PIC S9999V9.
02 MEAN-RUN-TIME PIC S9999V9.
02 STANDARD-DEVIATION PIC S9999V9.
02 PERCENT-HOLD PIC S999V999.
02 RUN-TIME-SQUARE PIC 999999V999.
02 MTBF PIC S9999V9.
02 SE-T1 PIC 999V9.
02 SE-T2 PIC 999V9.
02 SE-T3 PIC 999V9.
02 SE-T4 PIC 999V9.
REPORT SECTION.
RD AVAIL-RPT.
* THESE ARE THE VARIOUS REPORT HEADER LINES
01 PAGE-HDR LINE NEXT PAGE TYPE DETAIL USAGE DISPLAY-7.
02 COLUMN 1 PIC X(30) VALUE 'SYSTEM AVAILABILITY REPORT FOR'.
02 COLUMN 32 PIC X(21) VALUE 'SYSTEM SERIAL NUMBER:'.
02 COLUMN 53 PIC Z(5) SOURCE RPT-CPU-NUMBER.
02 COLUMN 103 PIC X(7) VALUE 'PERIOD:'.
02 COLUMN 111 PIC X(9) SOURCE RPT-BEGIN-DATE.
02 COLUMN 121 PIC XX VALUE 'TO'.
02 COLUMN 124 PIC X(9) SOURCE RPT-END-DATE.
01 SYSTEM-STATS-HDR TYPE DETAIL USAGE DISPLAY-7.
02 LINE PLUS 3 COLUMN 1 PIC X(5) VALUE ALL '*'.
02 COLUMN 7 PIC X(17) VALUE 'SYSTEM STATISTICS'.
02 COLUMN 25 PIC X(5) VALUE ALL '*'.
02 COLUMN 30 PIC X(20) VALUE '(all times in hours)'.
02 LINE PLUS 2 COLUMN 1 PIC X(20) VALUE 'AVAILABILITY FIGURES'.
02 COLUMN 35 PIC X(28) VALUE 'SYSTEM EFFECTIVENESS FIGURES'.
02 COLUMN 70 PIC X(15) VALUE 'RUNTIME FIGURES'.
02 COLUMN 100 PIC X(16) VALUE 'DOWNTIME FIGURES'.
01 BAD-RELOADS-HDR TYPE DETAIL USAGE DISPLAY-7.
02 LINE PLUS 3 COLUMN 1 PIC X(5) VALUE ALL '*'.
02 COLUMN 7 PIC X(7) SOURCE RELOAD-LITERAL.
02 COLUMN 15 PIC X(32) SOURCE EFFECT-LITERAL.
02 COLUMN 47 PIC X(5) VALUE ALL '*'.
02 LINE PLUS 2 COLUMN 1 PIC X(12) SOURCE MONITOR-LITERAL.
02 COLUMN 40 PIC X(7) SOURCE VERSION-LITERAL.
02 COLUMN 50 PIC X(32) VALUE 'STOPCD HALT PARITY HDW'.
02 COLUMN 88 PIC X(29) VALUE 'NXM HUNG LOOP CM'.
02 COLUMN 121 PIC X(6) SOURCE TOTAL-LITERAL.
01 GOOD-RELOADS-HDR TYPE DETAIL USAGE DISPLAY-7.
02 LINE PLUS 3 COLUMN 1 PIC X(5) VALUE ALL '*'.
02 COLUMN 7 PIC X(7) SOURCE RELOAD-LITERAL.
02 COLUMN 15 PIC XXX VALUE 'NOT'.
02 COLUMN 19 PIC X(32) SOURCE EFFECT-LITERAL.
02 COLUMN 51 PIC X(5) VALUE ALL '*'.
02 LINE PLUS 2 COLUMN 1 PIC X(12) SOURCE MONITOR-LITERAL.
02 COLUMN 40 PIC X(7) SOURCE VERSION-LITERAL.
02 COLUMN 51 PIC X(30) VALUE 'POWER STATIC OPR PM'.
02 COLUMN 88 PIC X(31) VALUE 'NEW SCHED S/A OTHER'.
02 COLUMN 121 PIC X(6) SOURCE TOTAL-LITERAL.
01 DEVICE-HDR TYPE DETAIL USAGE DISPLAY-7.
02 LINE PLUS 3 COLUMN 1 PIC X(5) VALUE ALL '*'.
02 COLUMN 7 PIC X(18) VALUE 'DEVICE OUTAGES NOT'.
02 COLUMN 26 PIC X(32) SOURCE EFFECT-LITERAL.
02 COLUMN 58 PIC X(5) VALUE ALL '*'.
02 LINE PLUS 2 COLUMN 40 PIC X(11) VALUE 'DEVICE NAME'.
02 COLUMN 64 PIC X(10) VALUE 'OCCURANCES'.
02 COLUMN 83 PIC X(11) VALUE 'OUTAGE TIME'.
01 STOPCD-HDR TYPE DETAIL USAGE DISPLAY-7.
02 LINE PLUS 3 COLUMN 1 PIC X(10) VALUE ALL '*'.
02 COLUMN 11 PIC X(30) VALUE 'STOPCODES ORDERED BY FREQUENCY'.
02 COLUMN 42 PIC X(5) VALUE ALL '*'.
02 LINE PLUS 2 COLUMN 40 PIC X(11) VALUE 'STOPCD NAME'.
02 COLUMN 64 PIC X(10) VALUE 'OCCURANCES'.
01 DASH-LINE LINE PLUS 1 TYPE DETAIL USAGE DISPLAY-7.
02 COLUMN 50 PIC X(60) VALUE ALL '----- '.
02 COLUMN 113 PIC X(13) VALUE '----- ------'.
01 CUSTOMER-LINE LINE PLUS 2 TYPE DETAIL USAGE DISPLAY-7.
02 COLUMN 43 PIC X(27) VALUE 'Customer satisfied(Y or N)?'.
02 COLUMN 70 PIC XXXX VALUE ALL '_'.
02 COLUMN 77 PIC X(18) VALUE 'Customer signature'.
02 COLUMN 95 PIC X(24) VALUE ALL '_'.
* THESE ARE THE DATA OUTPUT LINES
01 SYS-STATS TYPE DETAIL USAGE DISPLAY-7.
02 LINE PLUS 2 COLUMN 5 PIC X(20) VALUE 'Operational cycle :'.
02 COLUMN 26 PIC ZZZZ9.9 SOURCE OPERATING-CYCLE.
02 COLUMN 40 PIC X(9) VALUE 'T= .1HRS:'.
02 COLUMN 53 PIC Z99.9 SOURCE SE-T1.
02 COLUMN 58 PIC X VALUE '%'.
02 COLUMN 70 PIC X(19) VALUE 'Total run time :'.
02 COLUMN 89 PIC ----9.9 SOURCE TOTAL-RUN-TIME.
02 COLUMN 107 PIC X(20) VALUE 'System not running:'.
02 COLUMN 126 PIC ----9.9 SOURCE TOTAL-DOWN-TIME.
02 LINE PLUS 1 COLUMN 5 PIC X(20) VALUE 'System availability:'.
02 COLUMN 26 PIC ZZ9.9 SOURCE SYSTEM-AVAILABILITY.
02 COLUMN 31 PIC X VALUE '%'.
02 COLUMN 40 PIC X(9) VALUE 'T= .5HRS:'.
02 COLUMN 53 PIC ZZ9.9 SOURCE SE-T2.
02 COLUMN 58 PIC X VALUE '%'.
02 COLUMN 70 PIC X(19) VALUE 'Maximum run time :'.
02 COLUMN 89 PIC ----9.9 SOURCE MAXIMUM-RUN-TIME.
02 COLUMN 107 PIC X(20) VALUE 'Maximum downtime :'.
02 COLUMN 126 PIC ----9.9 SOURCE MAXIMUM-DOWN-TIME.
02 LINE PLUS 1 COLUMN 5 PIC X(20) VALUE 'User availability :'.
02 COLUMN 26 PIC ZZ9.9 SOURCE USER-AVAILABILITY.
02 COLUMN 31 PIC X VALUE '%'.
02 COLUMN 40 PIC X(9) VALUE 'T=1.0HRS:'.
02 COLUMN 53 PIC ZZ9.9 SOURCE SE-T3.
02 COLUMN 58 PIC X VALUE '%'.
02 COLUMN 70 PIC X(19) VALUE 'Minimum run time :'.
02 COLUMN 89 PIC ----9.9 SOURCE MINIMUM-RUN-TIME.
02 COLUMN 107 PIC X(20) VALUE 'Minimum downtime :'.
02 COLUMN 126 PIC ----9.9 SOURCE MINIMUM-DOWN-TIME.
02 LINE PLUS 1 COLUMN 5 PIC X(20) VALUE 'Number of reloads :'.
02 COLUMN 26 PIC ZZZZZ SOURCE TOTAL-RELOADS.
02 COLUMN 40 PIC X(9) VALUE 'T=4.0HRS:'.
02 COLUMN 53 PIC ZZ9.9 SOURCE SE-T4.
02 COLUMN 58 PIC X VALUE '%'.
02 COLUMN 70 PIC X(19) VALUE 'Mean run time :'.
02 COLUMN 90 PIC ZZZ9.9 SOURCE MEAN-RUN-TIME.
02 COLUMN 107 PIC X(20) VALUE 'Mean downtime :'.
02 COLUMN 127 PIC ZZZ9.9 SOURCE MEAN-DOWN-TIME.
02 LINE PLUS 1 COLUMN 70 PIC X(19) VALUE 'Standard deviation:'.
02 COLUMN 90 PIC ZZZ9.9 SOURCE STANDARD-DEVIATION.
01 RELOAD-STATS TYPE DETAIL USAGE DISPLAY-7.
02 LINE PLUS 1 COLUMN 1 PIC X(35) SOURCE RELOAD-NAME-OUT.
02 COLUMN 41 PIC X(5) SOURCE RELOAD-VERSION-OUT.
02 COLUMN 49 PIC ZZZZ SOURCE STP-PWR-COUNT.
02 COLUMN 58 PIC ZZZZ SOURCE HLT-STAT-COUNT.
02 COLUMN 67 PIC ZZZZ SOURCE PAR-OPR-COUNT.
02 COLUMN 76 PIC ZZZZ SOURCE HDW-PM-COUNT.
02 COLUMN 85 PIC ZZZZ SOURCE NXM-NEW-COUNT.
02 COLUMN 94 PIC ZZZZ SOURCE HNG-SCD-COUNT.
02 COLUMN 103 PIC ZZZZ SOURCE LUP-SA-COUNT.
02 COLUMN 112 PIC ZZZZ SOURCE CM-OTHR-COUNT.
02 COLUMN 120 PIC ZZZZ SOURCE RELOAD-TOT-COUNT.
02 COLUMN 128 PIC X(5) VALUE 'COUNT'.
02 LINE PLUS 1 COLUMN 48 PIC ----9.9 BLANK ZERO SOURCE STP-PWR-TIME.
02 COLUMN 57 PIC ----9.9 BLANK ZERO SOURCE HLT-STAT-TIME.
02 COLUMN 66 PIC ----9.9 BLANK ZERO SOURCE PAR-OPR-TIME.
02 COLUMN 75 PIC ----9.9 BLANK ZERO SOURCE HDW-PM-TIME.
02 COLUMN 84 PIC ----9.9 BLANK ZERO SOURCE NXM-NEW-TIME.
02 COLUMN 93 PIC ----9.9 BLANK ZERO SOURCE HNG-SCD-TIME.
02 COLUMN 102 PIC ----9.9 BLANK ZERO SOURCE LUP-SA-TIME.
02 COLUMN 111 PIC ----9.9 BLANK ZERO SOURCE CM-OTHR-TIME.
02 COLUMN 119 PIC ----9.9 BLANK ZERO SOURCE RELOAD-TOT-TIME.
02 COLUMN 128 PIC X(4) VALUE 'TIME'.
01 DEV-STOP-STATS LINE PLUS 1 TYPE DETAIL USAGE DISPLAY-7.
02 COLUMN 40 PIC X(6) SOURCE DEVICE-STOPCODE-NAME.
02 COLUMN 66 PIC ZZZZ SOURCE DEVICE-STOPCODE-COUNT.
02 COLUMN 84 PIC ----9.9 BLANK ZERO SOURCE DEVICE-OUTAGE-TIME.
* FOLLOWING ARE DEBUGGING MESSAGES OUTPUT WHEN PROBLEMS OCCUR
* EITHER WITH THE ERROR FILE OR WITH PROGRAM LIMITATIONS
01 WARNING-HDR TYPE DETAIL.
02 LINE 3 COLUMN 58 PIC X(5) VALUE ALL '*'.
02 COLUMN 64 PIC X(7) VALUE 'WARNING'.
02 COLUMN 72 PIC X(5) VALUE ALL '*'.
02 LINE PLUS 1 COLUMN 40 PIC X(28) VALUE 'THIS REPORT IS QUESTIONABLE'.
02 COLUMN 68 PIC X(50) VALUE 'BECAUSE OF INTERNAL ERRORS.'.
02 LINE PLUS 1 COLUMN 40 PIC X(26) VALUE 'FOLLOWING IS A DESCRIPTION'.
02 COLUMN 68 PIC X(40) VALUE 'OF THOSE ERRORS FOUND.'.
02 LINE PLUS 1 COLUMN 1 PIC X(132) VALUE ALL SPACES.
* INVALID RELOAD ERROR MESSAGE
01 INVALID-WHY LINE PLUS 1 TYPE DETAIL.
02 COLUMN 31 PIC XXX VALUE '?--'.
02 COLUMN 35 PIC X(15) VALUE 'FILE CONTAINED '.
02 COLUMN 50 PIC ZZZ SOURCE BAD-RELOAD-CODE.
02 COLUMN 54 PIC X(22) VALUE 'UNKNOWN RELOAD REASONS'.
* TOO MANY RELOADS MESSAGE
01 R-OVER-MSG LINE PLUS 1 TYPE DETAIL.
02 COLUMN 31 PIC XXX VALUE '?--'.
02 COLUMN 35 PIC X(28) VALUE 'TOO MANY DIFFERENT MONITORS.'.
02 COLUMN 64 PIC X(10) VALUE 'OVERFLOW ='.
02 COLUMN 75 PIC ZZZ SOURCE RELOAD-OVERFLOW.
* TOO MANY DEVICES MESSAGE
01 D-OVER-MSG LINE PLUS 1 TYPE DETAIL.
02 COLUMN 31 PIC XXX VALUE '?--'.
02 COLUMN 35 PIC X(28) VALUE 'TOO MANY DIFFERENT DEVICES.'.
02 COLUMN 64 PIC X(10) VALUE 'OVERFLOW ='.
02 COLUMN 75 PIC ZZZ SOURCE DEVICE-OVERFLOW.
* TOO MANY STOPCODES MESSAGE
01 S-OVER-MSG LINE PLUS 1 TYPE DETAIL.
02 COLUMN 31 PIC XXX VALUE '?--'.
02 COLUMN 35 PIC X(28) VALUE 'TOO MANY VARIOUS STOPCODES.'.
02 COLUMN 64 PIC X(10) VALUE 'OVERFLOW ='.
02 COLUMN 75 PIC ZZZ SOURCE STOPCODE-OVERFLOW.
* TIME WENT BACKWARDS MESSAGE
01 TIME-REVERSE-MSG LINE PLUS 1 TYPE DETAIL.
02 COLUMN 31 PIC XXX VALUE '?--'.
02 COLUMN 35 PIC X(28) VALUE 'TIMES IN AVAIL FILE REVERSED'.
02 COLUMN 64 PIC ZZZ SOURCE BACKWARDS-TIME.
02 COLUMN 68 PIC X(5) VALUE 'TIMES'.
RD RELOAD-DETAIL-RPT.
* THIS IS THE RELOAD DETAIL FILE FORMAT (RELDET.RPT)
01 RELOD-DET-HDR TYPE PH USAGE DISPLAY-7.
02 LINE NEXT PAGE COLUMN 1 PIC X(31) VALUE 'DETAILED LISTING OF RELOAD DATA'.
02 COLUMN 33 PIC X(25) VALUE 'FOR SYSTEM SERIAL NUMBER:'.
02 COLUMN 58 PIC Z(5) SOURCE RPT-CPU-NUMBER.
01 RELOAD-DETAILS TYPE DETAIL USAGE DISPLAY-7.
02 LINE PLUS 2 COLUMN 1 PIC X(35) SOURCE OLD-RELOAD-MON-NAME-ASC.
02 COLUMN 37 PIC X(5) SOURCE OLD-RELOAD-VERSION.
02 COLUMN 45 PIC X(6) SOURCE OLD-RELOAD-WHY.
02 COLUMN 54 PIC X(7) VALUE 'LOAD :'.
02 COLUMN 61 PIC X(9) SOURCE DETAIL-LOAD-DATE.
02 COLUMN 71 PIC X(8) SOURCE DETAIL-LOAD-TIME.
02 LINE PLUS 1 COLUMN 54 PIC X(7) VALUE 'CRASH :'.
02 COLUMN 61 PIC X(9) SOURCE DETAIL-CRASH-DATE.
02 COLUMN 71 PIC X(8) SOURCE DETAIL-CRASH-TIME.
02 LINE PLUS 1 COLUMN 76 PIC ----9.999 SOURCE THIS-RUN-TIME.
02 COLUMN 89 PIC X(8) VALUE 'RUN TIME'.
02 LINE PLUS 1 COLUMN 54 PIC X(7) VALUE 'RELOAD'.
02 COLUMN 61 PIC X(9) SOURCE DETAIL-RELOAD-DATE.
02 COLUMN 71 PIC X(8) SOURCE DETAIL-RELOAD-TIME.
02 LINE PLUS 1 COLUMN 76 PIC ----9.999 SOURCE THIS-DOWN-TIME.
02 COLUMN 89 PIC X(9) VALUE 'DOWN TIME'.
RD DEVICE-DETAIL-RPT.
* DETAILED LISTING OF DEVICE STATUS CHANGES (DETDEV.RPT)
01 TYPE PH LINE NEXT PAGE USAGE DISPLAY-7.
02 COLUMN 1 PIC X(41) VALUE 'DETAILED LISTING OF DEVICE STATUS CHANGES'.
02 COLUMN 43 PIC X(25) VALUE 'FOR SYSTEM SERIAL NUMBER:'.
02 COLUMN 68 PIC Z(5) SOURCE RPT-CPU-NUMBER.
02 LINE PLUS 1 COLUMN 1 PIC X(5) VALUE 'NODE/'.
02 LINE PLUS 1 COLUMN 1 PIC X(14) VALUE 'DEVICE SUBSYS'.
02 COLUMN 46 PIC XXX VALUE 'RUN'.
02 COLUMN 52 PIC X(6) VALUE 'OUTAGE'.
02 COLUMN 65 PIC X(9) VALUE 'SUBSYSTEM'.
02 LINE PLUS 1 COLUMN 2 PIC X(12) VALUE 'NAME NAME'.
02 COLUMN 47 PIC X VALUE '#'.
02 COLUMN 53 PIC X(4) VALUE 'TIME'.
02 COLUMN 67 PIC X(5) VALUE 'TOTAL'.
01 DEV-TIME-DET TYPE DETAIL USAGE DISPLAY-7.
02 LINE PLUS 1 COLUMN 45 PIC X(5) VALUE '-----'.
02 COLUMN 51 PIC ----9.999 SOURCE DEVICE-OUTAGE-TIME.
02 COLUMN 61 PIC XXX VALUE 'HRS'.
02 COLUMN 65 PIC ----9.999 SOURCE DETAIL-SUB-TOTAL.
02 COLUMN 75 PIC XXX VALUE 'HRS'.
01 DEVICE-DETAILS TYPE DETAIL USAGE DISPLAY-7.
02 LINE PLUS 2 COLUMN 1 PIC X(6) SOURCE DEVICE-STOPCODE-NAME.
02 COLUMN 9 PIC X(6) SOURCE DETAIL-SUBSYS-NAME.
02 COLUMN 17 PIC XXX SOURCE DETAIL-DEVICE-ON-OFF.
02 COLUMN 22 PIC X(9) SOURCE DETAIL-DEVICE-DATE.
02 COLUMN 33 PIC X(8) SOURCE DETAIL-DEVICE-TIME.
02 COLUMN 44 PIC ZZZZ SOURCE TOTAL-RELOADS.
01 TIME-DETAILS TYPE DETAIL USAGE DISPLAY-7.
02 LINE PLUS 2 COLUMN 50 PIC X(23) VALUE 'TIME ADJUSTMENT FOR RUN'.
02 COLUMN 74 PIC ZZZZ SOURCE DETAIL-RELOAD-NUMBER.
02 COLUMN 79 PIC X VALUE '='.
02 COLUMN 81 PIC -----9.9 SOURCE DETAIL-TIME-CHANGE.
02 COLUMN 90 PIC XXX VALUE 'HRS'.
01 DEVICE-STILL-DOWN-DETAIL TYPE DETAIL DISPLAY-7.
02 LINE PLUS 2 COLUMN 1 PIC X(6) SOURCE DEVICE-STOPCODE-NAME.
02 COLUMN 17 PIC X(9) VALUE 'STILL OFF'.
PROCEDURE DIVISION.
* MODULE CHART
* ********************
* * *
* * *
* * *
* * 000 *
* * *
* * REPORT *
* * AVAILABILITY *
* * *
* ********************
* *
* *
* *
* *
* **************************************************************
* * * *
* * * *
* * * *
******************** ******************** ********************
* * * * * *
* * * * * *
* 100 * * 200 * * 300 *
* * * * * *
* * * * * *
* ACCUMULATE * * CALCULATE * * GENERATE *
* STATISTICS * * AVAILABILITY * * REPORT *
* * * * * *
******************** ******************** ********************
000-AVAIL-REPORT.
DISPLAY 'SYSTEM AVAILABILITY REPORTER--TYPE [CR] FOR ALL DEFAULTS'.
DISPLAY 'TYPE "H" FOR HELP ANYTIME.'.
DISPLAY SPACE.
PERFORM 010-GET-OPTION UNTIL NOT INVALID-OPTION
AND NOT HELP-WITH-OPTION.
IF MULTI-REPORT
MOVE 'A01' TO RPT-FILE-EXT
ELSE
MOVE 'RPT' TO RPT-FILE-EXT.
IF ONE-WEEK
DISPLAY '[SEARCHING FOR LAST WEEK]'
MOVE 'A' TO IN-EXT-1
MOVE ZERO TO EXTENSION-CHECK
MOVE 'SYS' TO IN-DEFAULT-EXT
MOVE LOOK-FILE TO REDERR-FUNCTION
PERFORM 805-FIND-DEFAULT-IN UNTIL MAXIMUM-EXTENSION
MOVE STOP-READ TO REDERR-FUNCTION
PERFORM 910-CALL-REDERR
MOVE IN-DEFAULT-EXT TO IN-FILE-EXT
ELSE
MOVE 'A01' TO IN-FILE-EXT.
IF MULTI-WEEK AND NOT SILENT-MODE
PERFORM 020-GET-DATES.
IF NOT SILENT-MODE
PERFORM 030-GET-SPEC
IF NOT MULTI-REPORT
PERFORM 040-GET-LOG-SWITCH UNTIL NOT HELP-WITH-LOGS.
DISPLAY SPACE.
MOVE RPT-FILE-NAME TO RIGHT-WORD.
PERFORM 900-RIGHT-MOVE.
DISPLAY 'MAIN REPORT FILE WILL BE -- ',RIGHT-WORD,'.',RPT-FILE-EXT.
IF LOGS-WANTED
DISPLAY 'RELOAD LOG WILL BE -- ',RIGHT-WORD,'.DE1'
DISPLAY 'DEVICE STATUS CHANGE LOG WILL BE -- ',RIGHT-WORD,'.DE2'.
DISPLAY SPACE.
PERFORM 050-DISPLAY-INPUT-FILE.
PERFORM 080-FIND-FIRST-AVAIL-FILE.
IF NOT NO-FILE AND NOT END-OF-FILE
MOVE IN-EXT-LAST TO EXTENSION-CHECK
MOVE NEXT-READ TO REDERR-FUNCTION
PERFORM 090-LOOP-THRU-AVAIL-FILES UNTIL ALL-DONE
DISPLAY 'OUTPUT FINISHED'.
STOP RUN.
010-GET-OPTION.
DISPLAY 'SELECTED OPTION-' WITH NO ADVANCING.
ACCEPT CURRENT-OPTION-SWITCH.
IF OPTION-NUMBER = SPACE
MOVE 1 TO OPTION-NUMBER.
IF HELP-WITH-OPTION
PERFORM HELP-PARAGRAPH-1
ELSE
IF INVALID-OPTION
DISPLAY 'PLEASE SELECT 1, 2, OR 3 [H FOR HELP]'.
020-GET-DATES.
PERFORM 021-GET-DATE-SWITCH UNTIL NOT HELP-WITH-DATES.
IF DATE-LIMITS
MOVE 'INIT' TO IN-DATE
PERFORM 022-GET-BEGIN-DATE UNTIL NOT INVALID-DATE
AND IN-DATE NUMERIC
MOVE 'INIT' TO IN-DATE
PERFORM 023-GET-END-DATE UNTIL NOT INVALID-DATE
AND IN-DATE NUMERIC.
021-GET-DATE-SWITCH.
DISPLAY 'ANY DATE LIMITS(Y OR N)?-' WITH NO ADVANCING.
ACCEPT DATE-LIMITS-SWITCH.
IF HELP-WITH-DATES
PERFORM HELP-PARAGRAPH-2.
022-GET-BEGIN-DATE.
DISPLAY 'BEGIN DATE(YYMMDD)-' WITH NO ADVANCING.
PERFORM 024-DATE-CHECK.
IF IN-DATE NUMERIC
MOVE IN-DATE TO RPT-BEGIN-DESIRED
ELSE
PERFORM HELP-PARAGRAPH-3.
023-GET-END-DATE.
DISPLAY 'END DATE(YYMMDD)-' WITH NO ADVANCING.
PERFORM 024-DATE-CHECK.
IF IN-DATE NUMERIC
MOVE IN-DATE TO RPT-END-DESIRED
ELSE
PERFORM HELP-PARAGRAPH-4.
024-DATE-CHECK.
ACCEPT IN-DATE.
IF IN-DATE = SPACE
MOVE ZEROS TO IN-DATE.
MOVE SPACE TO INVALID-DATE-FLAG.
IF IN-DATE NUMERIC AND IN-DATE NOT = ZERO
PERFORM 025-DATE-VALIDATE.
025-DATE-VALIDATE.
IF MAX-YR OR MIN-YR
MOVE 'Y' TO INVALID-DATE-FLAG
DISPLAY 'YEAR MUST BE 79 TO 84'.
IF MAX-MO OR MIN-MO
MOVE 'Y' TO INVALID-DATE-FLAG
DISPLAY 'MONTH MUST BE 1 TO 12'.
IF MAX-DAY OR MIN-DAY
MOVE 'Y' TO INVALID-DATE-FLAG
DISPLAY 'DAY MUST BE 1 TO 31'.
DIVIDE IN-MO BY 2 GIVING TEST-MO REMAINDER TEST-REM.
IF IN-DAY = 31 AND
((TEST-REM = ZERO AND IN-MO < 8) OR (TEST-REM = 1 AND IN-MO > 7))
MOVE 'Y' TO INVALID-DATE-FLAG
DISPLAY 'THAT MONTH HAS LESS THAN 31 DAYS'.
IF IN-MO = 2 AND IN-DAY > 28
DIVIDE IN-YR BY 4 GIVING TEST-MO REMAINDER TEST-REM
IF TEST-REM NOT = ZERO
MOVE 'Y' TO INVALID-DATE-FLAG
DISPLAY 'FEBRUARY ONLY HAS 28 DAYS THIS YEAR'
ELSE
IF IN-DAY > 29
MOVE 'Y' TO INVALID-DATE-FLAG
DISPLAY 'FEBRUARY ONLY HAS 29 DAYS THIS YEAR'.
030-GET-SPEC.
DISPLAY 'PLEASE ENTER FILE SPECIFICATION AS:'.
DISPLAY 'OUTFIL.EXT=INDEV:INFILE.EXT[PROJ,PROG]'.
DISPLAY SPACE.
DISPLAY 'DEFAULTS ARE: ' WITH NO ADVANCING.
DISPLAY 'AVAIL.'RPT-FILE-EXT,'=SYS:AVAIL.',IN-FILE-EXT.
PERFORM 031-GET-GOOD-SPEC UNTIL SPEC-OK
AND NOT HELP-TYPED
AND NOT HELP-WANTED.
031-GET-GOOD-SPEC.
MOVE 'Y' TO SPEC-OK-FLAG.
DISPLAY SPACE.
DISPLAY '*' WITH NO ADVANCING.
MOVE SPACES TO SPEC-BLOCK.
ACCEPT FILE-SPEC-LINE.
IF HELP-WANTED OR HELP-TYPED
PERFORM HELP-PARAGRAPH-5
ELSE
MOVE 1 TO SPEC-INDEX,STRING-POINTER
PERFORM 032-UNSTRING-SPEC UNTIL SPEC-UNSTRUNG
MOVE 1 TO SPEC-INDEX
PERFORM 035-SORT-SPEC UNTIL SOURCE-DONE OR DESTINATION-DONE
IF DESTINATION-DONE
PERFORM 033-LOAD-DESTINATION
MOVE SPACES TO SPEC-BLOCK
PERFORM 035-SORT-SPEC UNTIL SOURCE-DONE.
IF SPEC-OK AND SOURCE-DONE
PERFORM 034-LOAD-SOURCE.
032-UNSTRING-SPEC.
UNSTRING FILE-SPEC-LINE
DELIMITED BY SPACE, OR ':', OR ',', OR '.', OR '[', OR ']', OR '='
INTO SPEC-VALUE(SPEC-INDEX)
DELIMITER IN SPEC-DELIMITER(SPEC-INDEX)
WITH POINTER STRING-POINTER.
IF SPEC-DELIMITER(SPEC-INDEX) = SPACE
MOVE SPEC-UNSTRUNG-SET TO FILE-SPEC-FLAG.
ADD 1 TO SPEC-INDEX.
033-LOAD-DESTINATION.
IF NOT DEVICE-OK
DISPLAY 'OUTPUT DEVICE MUST BE DSK!'.
IF SPEC-FILE-NAME NOT = SPACE
MOVE SPEC-FILE-NAME TO
RPT-FILE-NAME,
REL-FILE-NAME,
DEV-FILE-NAME.
IF SPEC-FILE-EXT NOT = SPACE
MOVE SPEC-FILE-EXT TO RPT-FILE-EXT.
IF SPEC-PROJ NOT = ZERO OR SPEC-PROG NOT = ZERO
DISPLAY 'OUTPUT PPN MUST BE ZERO (YOURS)'.
IF NOT DEVICE-OK OR SPEC-PROJ NOT = ZERO OR SPEC-PROG NOT = ZERO
MOVE 'N' TO SPEC-OK-FLAG.
IF MULTI-REPORT AND RPT-EXT-1 NOT = 'A' AND RPT-EXT-LAST NOT NUMERIC
DISPLAY 'OUTPUT REPORTS FOR THIS OPTION REQUIRE'
DISPLAY 'EXTENSIONS BEGINNING WITH "A" AND'
DISPLAY 'ENDING WITH A TWO DIGIT NUMBER.'
MOVE 'N' TO SPEC-OK-FLAG.
034-LOAD-SOURCE.
IF SPEC-DEVICE NOT = SPACE
MOVE SPEC-DEVICE TO INPUT-DEVICE.
IF SPEC-DEVICE = SPACE AND SPEC-PROJ NOT = ZERO
MOVE 'DSK' TO INPUT-DEVICE.
IF SPEC-FILE-NAME NOT = SPACE
MOVE SPEC-FILE-NAME TO IN-FILE-NAME.
IF SPEC-FILE-EXT NOT = SPACE
MOVE SPEC-FILE-EXT TO IN-FILE-EXT.
IF SPEC-PROJ NOT = ZERO
MOVE SPEC-PROJ TO PROJ.
IF SPEC-PROG NOT = ZERO
MOVE SPEC-PROG TO PROG.
IF NOT ONE-WEEK AND (IN-EXT-1 NOT = 'A' OR IN-EXT-LAST NOT NUMERIC)
DISPLAY 'INPUT FILES FOR THIS OPTION REQUIRE EXTENSIONS'
DISPLAY 'BEGINNING WITH AND "A" AND ENDING WITH'
DISPLAY 'A TWO DIGIT NUMBER.'
MOVE 'N' TO SPEC-OK-FLAG.
IF MULTI-REPORT AND IN-FILE-EXT NOT = RPT-FILE-EXT
DISPLAY 'THIS OPTION REQUIRES INPUT AND OUTPUT EXTENSIONS TO MATCH'
MOVE 'N' TO SPEC-OK-FLAG.
035-SORT-SPEC.
IF SPEC-DELIMITER(SPEC-INDEX) = ':'
MOVE SPEC-VALUE(SPEC-INDEX) TO SPEC-DEVICE.
IF SPEC-DELIMITER(SPEC-INDEX) = '.'
MOVE SPEC-VALUE(SPEC-INDEX) TO SPEC-FILE-NAME.
IF SPEC-DELIMITER(SPEC-INDEX) = ','
MOVE SPEC-VALUE(SPEC-INDEX) TO
RIGHT-WORD,
DISPLAY-PROJ
PERFORM 900-RIGHT-MOVE
MOVE RIGHT-WORD TO SPEC-PROJ.
IF SPEC-DELIMITER(SPEC-INDEX) = ']'
MOVE SPEC-VALUE(SPEC-INDEX) TO
RIGHT-WORD,
DISPLAY-PROG
PERFORM 900-RIGHT-MOVE
MOVE RIGHT-WORD TO SPEC-PROG.
IF SPEC-DELIMITER(SPEC-INDEX) = '['
IF SPEC-FILE-NAME = SPACE
MOVE SPEC-VALUE(SPEC-INDEX) TO SPEC-FILE-NAME
ELSE
MOVE SPEC-VALUE(SPEC-INDEX) TO SPEC-FILE-EXT.
IF SPEC-DELIMITER(SPEC-INDEX) = SPACE OR '='
IF SPEC-INDEX > 1
IF SPEC-DELIMITER(SPEC-INDEX - 1) = ','
MOVE SPEC-VALUE(SPEC-INDEX) TO
RIGHT-WORD,
DISPLAY-PROG
PERFORM 900-RIGHT-MOVE
MOVE RIGHT-WORD TO SPEC-PROG
ELSE
IF SPEC-DELIMITER(SPEC-INDEX - 1) = '.'
MOVE SPEC-VALUE(SPEC-INDEX) TO SPEC-FILE-EXT
ELSE
IF SPEC-VALUE(SPEC-INDEX) NOT = SPACE
MOVE SPEC-VALUE(SPEC-INDEX) TO SPEC-FILE-NAME
ELSE NEXT SENTENCE
ELSE
IF SPEC-VALUE(1) NOT = SPACE
AND SPEC-DELIMITER(SPEC-INDEX) = '='
MOVE SPEC-VALUE(1) TO SPEC-FILE-NAME.
ADD 1 TO SPEC-INDEX.
IF SPEC-DELIMITER(SPEC-INDEX - 1) = SPACE
MOVE SOURCE-DONE-SET TO FILE-SPEC-FLAG
ELSE
IF SPEC-DELIMITER(SPEC-INDEX - 1) = '='
MOVE DEST-DONE-SET TO FILE-SPEC-FLAG.
040-GET-LOG-SWITCH.
DISPLAY 'DO YOU WANT LOG FILES(Y OR N)-' WITH NO ADVANCING.
ACCEPT LOG-FILES-SWITCH.
IF HELP-WITH-LOGS
PERFORM HELP-PARAGRAPH-6.
050-DISPLAY-INPUT-FILE.
MOVE SPACES TO FILE-SPEC-LINE.
MOVE 1 TO STRING-POINTER.
STRING INPUT-DEVICE,':',IN-FILE-NAME,'.',IN-FILE-EXT
DELIMITED BY SPACE INTO FILE-SPEC-LINE
WITH POINTER STRING-POINTER.
IF DISPLAY-PROJ NOT = SPACE
STRING "[",DISPLAY-PROJ,",", DISPLAY-PROG, "]"
DELIMITED BY SPACE INTO FILE-SPEC-LINE
WITH POINTER STRING-POINTER.
DISPLAY 'INPUT FILE IS -- ',FILE-SPEC-LINE.
080-FIND-FIRST-AVAIL-FILE.
MOVE START-READ TO REDERR-FUNCTION.
PERFORM 910-CALL-REDERR.
MOVE SPACES TO FILE-SPEC-LINE.
STRING INPUT-DEVICE,':',IN-FILE-NAME,'.',IN-FILE-EXT
DELIMITED BY SPACE INTO FILE-SPEC-LINE.
IF NO-FILE
DISPLAY 'UNABLE TO FIND ',FILE-SPEC-LINE
DISPLAY 'PLEASE TRY AGAIN'.
IF END-OF-FILE
DISPLAY FILE-SPEC-LINE
DISPLAY 'CONTAINS NO RELOAD OR DEVICE ENTRIES!'
DISPLAY 'PLEASE TRY ANOTHER FILE OR LONGER PERIOD.'.
090-LOOP-THRU-AVAIL-FILES.
PERFORM 095-CLEAR-SETUP.
IF LOGS-WANTED
OPEN OUTPUT
RELOAD-DETAIL,
DEVICE-DETAIL
INITIATE
RELOAD-DETAIL-RPT,
DEVICE-DETAIL-RPT.
PERFORM 910-CALL-REDERR UNTIL
HEADER-DATE-SIXBIT > RPT-BEGIN-DESIRED OR = RPT-BEGIN-DESIRED OR
END-OF-FILE.
IF ONE-WEEK OR MULTI-REPORT
PERFORM 100-ACCUMULATE-STATS UNTIL END-OF-FILE OR END-SEEN
ELSE
PERFORM 100-ACCUMULATE-STATS UNTIL MAXIMUM-EXTENSION.
MOVE STOP-READ TO REDERR-FUNCTION.
PERFORM 910-CALL-REDERR.
IF BEGIN-SEEN AND END-SEEN
PERFORM 102-NEW-GET-FINAL-STATS
ELSE
PERFORM 101-OLD-GET-FINAL-STATS.
IF LOGS-WANTED
TERMINATE
RELOAD-DETAIL-RPT,
DEVICE-DETAIL-RPT
CLOSE
RELOAD-DETAIL,
DEVICE-DETAIL.
IF STATS-OK
PERFORM 200-CALCULATE-AVAIL
PERFORM 300-REPORT-AVAILABILITY.
IF ONE-WEEK OR MULTI-WEEK
MOVE 'Y' TO ALL-DONE-FLAG
ELSE
PERFORM 800-FIND-FILE UNTIL
(NOT NO-FILE AND NOT END-OF-FILE) OR MAXIMUM-EXTENSION
IF MAXIMUM-EXTENSION
MOVE 'Y' TO ALL-DONE-FLAG
ELSE
MOVE EXTENSION-CHECK TO RPT-EXT-LAST.
095-CLEAR-SETUP.
MOVE ZEROS TO
SYSTEM-STATISTICS,
ERROR-COUNTERS,
LINE-COUNTS,
E.
MOVE SPACES TO
RELOAD-TABLE,
DEVICE-STATS-TABLE,
SUBSYS-OUT-TABLE,
STOPCODE-TABLE.
MOVE 'N' TO
BEGIN-SEEN-FLAG,
END-SEEN-FLAG,
ALL-DONE-FLAG.
100-ACCUMULATE-STATS.
MOVE 'N' TO END-SEEN-FLAG.
IF BEGIN-ENTRY AND NOT BEGIN-SEEN
PERFORM 180-START-UP-CYCLE.
IF END-ENTRY AND BEGIN-SEEN
PERFORM 185-FINALIZE-CYCLE.
IF HEADER-DATE-SIXBIT > RPT-END-DESIRED
MOVE END-OF-FILE-SET TO HEADER-CODE.
IF STATUS-CHANGE-ENTRY
PERFORM 110-HANDLE-CHANGE.
IF RELOAD-ENTRY
PERFORM 150-HANDLE-RELOAD.
IF NOT END-OF-FILE AND NOT END-SEEN
PERFORM 910-CALL-REDERR
ELSE
MOVE STOP-READ TO REDERR-FUNCTION
PERFORM 910-CALL-REDERR
IF MULTI-WEEK
PERFORM 800-FIND-FILE UNTIL
(NOT NO-FILE AND NOT END-OF-FILE) OR MAXIMUM-EXTENSION.
101-OLD-GET-FINAL-STATS.
IF TOTAL-RELOADS = ZERO
MOVE 'N' TO STATS-OK-FLAG
DISPLAY 'NO RELOADS DURING THIS SELECTED PERIOD'
DISPLAY 'NO REPORT GENERATED' WITH NO ADVANCING
IF MULTI-WEEK
DISPLAY '! TRY LONGER PERIOD.'
ELSE
DISPLAY ' FOR EXTENSION ',IN-FILE-EXT
ELSE
MOVE OLD-RELOAD TO
DJ-TWO,
OPERATING-CYCLE-END
MOVE OPERATING-CYCLE-START TO DJ-ONE
PERFORM 930-SUB-DAY-JIFF
COMPUTE OPERATING-CYCLE ROUNDED =
(D-OUT * 24) + (J-OUT / 10800)
IF OPERATING-CYCLE < 20
MOVE 'N' TO STATS-OK-FLAG
DISPLAY 'OPERATING CYCLE IS LESS THAN 20 HOURS'
DISPLAY 'NO REPORT GENERATED'
IF MULTI-WEEK
DISPLAY '!'
ELSE
DISPLAY ' FOR EXTENSION ',IN-FILE-EXT
ELSE
MOVE 'Y' TO STATS-OK-FLAG
MOVE OLD-RELOAD-SIXBIT TO IN-DATE
PERFORM 960-STRING-DATE
MOVE DATE-STRING-OUT TO RPT-END-DATE
PERFORM 151-ACCUMULATE-OLD-RELOAD
SET D TO 1
PERFORM 103-CALC-FINAL-DEVICE-STATS
UNTIL STATS-DEVICE-NAME(D) = SPACE.
102-NEW-GET-FINAL-STATS.
MOVE OPERATING-CYCLE-END TO DJ-TWO.
MOVE OPERATING-CYCLE-START TO DJ-ONE.
PERFORM 930-SUB-DAY-JIFF.
COMPUTE OPERATING-CYCLE ROUNDED =
(D-OUT * 24) + (J-OUT / 10800).
PERFORM 151-ACCUMULATE-OLD-RELOAD.
MOVE OPERATING-CYCLE-END TO DJ-TWO.
MOVE OLD-RELOAD TO DJ-ONE.
PERFORM 930-SUB-DAY-JIFF.
COMPUTE THIS-RUN-TIME ROUNDED =
(D-OUT * 24) + (J-OUT / 10800).
ADD THIS-RUN-TIME TO TOTAL-RUN-TIME.
IF THIS-RUN-TIME NOT = ZERO
PERFORM 153-SAVE-MIN-MAX-RUN-TIMES.
COMPUTE RUN-TIME-SQUARE ROUNDED =
RUN-TIME-SQUARE + (THIS-RUN-TIME ** 2).
PERFORM 170-ACCUMULATE-DEVICES.
SET D TO 1.
PERFORM 103-CALC-FINAL-DEVICE-STATS.
103-CALC-FINAL-DEVICE-STATS.
MOVE STATS-SUBSYS-CODE(D) TO SU.
IF (STATS-DAYS-OFF(D) > ZERO OR STATS-DAYS-ON(D) > ZERO) AND
(SU NOT = 3 OR STATS-DAYS-OFF(D) NOT = ZERO)
PERFORM 104-CALC-DEVICES-STILL-OFF.
SET D UP BY 1.
104-CALC-DEVICES-STILL-OFF.
MOVE STATS-DEVICE-NAME(D) TO DEVICE-STOPCODE-NAME.
EXAMINE DEVICE-STOPCODE-NAME
REPLACING LEADING ZEROS BY SPACES.
IF LOGS-WANTED
GENERATE DEVICE-STILL-DOWN-DETAIL.
IF STATS-DAYS-OFF(D) = ZERO
MOVE OPERATING-CYCLE-START TO STATS-DEVICE-OFF(D).
IF STATS-DAYS-ON(D) = ZERO
MOVE OPERATING-CYCLE-END TO STATS-DEVICE-ON(D).
IF STATS-CPU-MEM-ON-COUNT(D) > ZERO
IF STATS-CPU-MEM-ON-COUNT(D) > STATS-DEVICE-OUTAGE-COUNT(D)
MOVE OPERATING-CYCLE-START TO STATS-DEVICE-OFF(D)
ELSE
IF STATS-CPU-MEM-ON-COUNT(D) <
STATS-DEVICE-OUTAGE-COUNT(D)
MOVE OPERATING-CYCLE-END TO STATS-DEVICE-ON(D).
PERFORM 175-ADD-NEW-DEV-OUTAGE.
110-HANDLE-CHANGE.
IF STATUS-DT-CHANGE
PERFORM 111-HANDLE-TIME-CHANGE
ELSE
IF NOT STATUS-XCHANGE
PERFORM 116-HANDLE-DEVICE-CHANGE.
111-HANDLE-TIME-CHANGE.
COMPUTE DETAIL-TIME-CHANGE ROUNDED =
(STATUS-DAY-CHANGE * 24) + (STATUS-TIME-CHANGE / 10800).
COMPUTE DETAIL-RELOAD-NUMBER =
TOTAL-RELOADS + 1.
IF LOGS-WANTED
GENERATE TIME-DETAILS.
MOVE STATUS-DT-CHANGE-VALUE TO DJ-ONE.
IF TOTAL-RELOADS > ZERO OR BEGIN-SEEN
MOVE OLD-RELOAD TO DJ-TWO
PERFORM 920-ADD-DAY-JIFF
MOVE DJ-OUT TO OLD-RELOAD
ENTER MACRO REDERR USING
OLD-RELOAD-DAYS,OLD-RELOAD-JIFFS,
OLD-RELOAD-DATE,OLD-RELOAD-CLOCK,
GET-UDT-FUNCTION.
IF (TOTAL-RELOADS = 1 AND NOT BEGIN-SEEN) OR
(TOTAL-RELOADS = ZERO AND BEGIN-SEEN)
MOVE OLD-RELOAD TO OPERATING-CYCLE-START
MOVE OLD-RELOAD-DATE TO IN-DATE
PERFORM 960-STRING-DATE
MOVE DATE-STRING-OUT TO RPT-BEGIN-DATE.
MOVE E TO E-SAVE.
MOVE ZERO TO E.
PERFORM 112-CHANGE-DEVICE-TIMES UNTIL E = E-SAVE.
112-CHANGE-DEVICE-TIMES.
ADD 1 TO E.
MOVE DEVICE-STACK-ON-OFF(E) TO DJ-TWO.
PERFORM 920-ADD-DAY-JIFF.
MOVE DJ-OUT TO DEVICE-STACK-ON-OFF(E).
116-HANDLE-DEVICE-CHANGE.
IF E = CM
MOVE ZERO TO E
DISPLAY '%TOO MANY DEVICE STATUS CHANGES BETWEEN RELOADS'
DISPLAY ' (DEVICE STATISTICS WILL BE LOST)'
ADD 1 TO DEVICE-OVERFLOW.
ADD 1 TO E.
MOVE STATUS-DEVICE-NAME TO DEVICE-STACK-NAME(E).
IF STATUS-ON
MOVE 1 TO DEVICE-STACK-TYPE(E)
ELSE
MOVE ZERO TO DEVICE-STACK-TYPE(E).
IF STATUS-NODE
MOVE 'COMM' TO STATUS-DEVICE-NAME
ELSE
IF STATUS-CPU-OR-MEM
MOVE SPACE TO RIGHT-HALF-NAME
ELSE
IF STATUS-DEVNAME-1 = 'R' OR 'D' OR 'F'
MOVE 'DISK' TO STATUS-DEVICE-NAME
ELSE
IF STATUS-DEVNAME-1 = 'M'
MOVE 'TAPE' TO STATUS-DEVICE-NAME.
SET SU TO 1.
SEARCH SUBSYS-TABLE
AT END
MOVE 6 TO SU
WHEN SUBSYS-TABLE(SU) = STATUS-DEVICE-NAME
NEXT SENTENCE.
MOVE SU TO DEVICE-STACK-SUBSYS(E).
MOVE STATUS-DT-CHANGE-VALUE TO DEVICE-STACK-ON-OFF(E).
150-HANDLE-RELOAD.
ADD 1 TO TOTAL-RELOADS.
IF TOTAL-RELOADS = 1 AND NOT BEGIN-SEEN
PERFORM 152-SET-CYCLE-BEGINNING
ELSE
PERFORM 161-FIX-CRASH-TIMES.
PERFORM 170-ACCUMULATE-DEVICES.
IF TOTAL-RELOADS > 1
PERFORM 151-ACCUMULATE-OLD-RELOAD.
MOVE NEW-RELOAD-DATA TO OLD-RELOAD-DATA.
151-ACCUMULATE-OLD-RELOAD.
COMPUTE THIS-RUN-TIME ROUNDED =
(OLD-RELOAD-UP-DAYS * 24) + (OLD-RELOAD-UP-JIFFS / 10800).
MOVE OLD-RELOAD TO DJ-TWO.
MOVE OLD-RELOAD-CRASH TO DJ-ONE.
PERFORM 930-SUB-DAY-JIFF.
COMPUTE THIS-DOWN-TIME ROUNDED =
(D-OUT * 24) + (J-OUT / 10800).
ADD THIS-RUN-TIME TO TOTAL-RUN-TIME.
ADD THIS-DOWN-TIME TO TOTAL-DOWN-TIME.
IF THIS-RUN-TIME NOT = ZERO
PERFORM 153-SAVE-MIN-MAX-RUN-TIMES.
IF THIS-DOWN-TIME NOT = ZERO
PERFORM 154-SAVE-MIN-MAX-DOWN-TIMES.
COMPUTE RUN-TIME-SQUARE ROUNDED =
RUN-TIME-SQUARE + (THIS-RUN-TIME ** 2).
MOVE OLD-RELOAD-MONITOR-NAME TO OLD-RELOAD-MON-NAME-SIX.
SET R TO 1.
SEARCH RELOAD-STACK
WHEN OLD-RELOAD-MON-NAME-ASC = RELOAD-NAME(R)
AND OLD-RELOAD-VERSION = RELOAD-VERSION-STACKED(R)
NEXT SENTENCE
WHEN RELOAD-NAME(R) = SPACE
MOVE OLD-RELOAD-MON-NAME-ASC TO RELOAD-NAME(R)
MOVE OLD-RELOAD-VERSION TO RELOAD-VERSION-STACKED(R)
WHEN R = RM - 1
ADD 1 TO RELOAD-OVERFLOW
MOVE 'OVERFLOW' TO OLD-RELOAD-MON-NAME-ASC.
IF OLD-RELOAD-WHY-PREFIX = 'S..'
SET B TO 1
PERFORM 158-UPDATE-BAD-RELOADS
PERFORM 159-UPDATE-STOPCODES
ELSE
PERFORM 155-FIND-RELOAD-REASON.
IF LOGS-WANTED
PERFORM 160-OUTPUT-RELOAD-LOG.
152-SET-CYCLE-BEGINNING.
MOVE NEW-RELOAD-UP-DATE TO IN-DATE.
PERFORM 960-STRING-DATE.
MOVE DATE-STRING-OUT TO RPT-BEGIN-DATE.
MOVE HEADER-CPU-NUMBER TO RPT-CPU-NUMBER.
MOVE NEW-RELOAD-CRASH TO DJ-TWO.
MOVE NEW-RELOAD-UPTIME TO DJ-ONE.
PERFORM 930-SUB-DAY-JIFF.
MOVE DJ-OUT TO OPERATING-CYCLE-START.
MOVE NEW-RELOAD-CRASH TO LAST-CRASH.
MOVE NEW-RELOAD-CRASH-SIXBIT TO LAST-CRASH-SIXBIT.
153-SAVE-MIN-MAX-RUN-TIMES.
MOVE THIS-RUN-TIME TO ROUNDER.
PERFORM 940-ROUND-A-NUMBER.
IF ROUNDER-OUT < MINIMUM-RUN-TIME OR MINIMUM-RUN-TIME = ZERO
MOVE ROUNDER-OUT TO MINIMUM-RUN-TIME.
IF ROUNDER-OUT > MAXIMUM-RUN-TIME
MOVE ROUNDER-OUT TO MAXIMUM-RUN-TIME.
154-SAVE-MIN-MAX-DOWN-TIMES.
MOVE THIS-DOWN-TIME TO ROUNDER.
PERFORM 940-ROUND-A-NUMBER.
IF ROUNDER-OUT < MINIMUM-DOWN-TIME OR MINIMUM-DOWN-TIME = ZERO
MOVE ROUNDER-OUT TO MINIMUM-DOWN-TIME.
IF ROUNDER-OUT > MAXIMUM-DOWN-TIME
MOVE ROUNDER-OUT TO MAXIMUM-DOWN-TIME.
155-FIND-RELOAD-REASON.
SET G TO 1.
SEARCH GOOD-RELOAD-TABLE
AT END
PERFORM 156-SEARCH-BAD-RELOAD
WHEN GOOD-RELOAD-TABLE(G) = OLD-RELOAD-WHY
PERFORM 157-UPDATE-GOOD-RELOADS.
156-SEARCH-BAD-RELOAD.
SET B TO 1.
SEARCH BAD-RELOAD-TABLE
AT END
ADD 1 TO BAD-RELOAD-CODE
SET G TO 7
PERFORM 157-UPDATE-GOOD-RELOADS
WHEN BAD-RELOAD-TABLE(B) = OLD-RELOAD-WHY
PERFORM 158-UPDATE-BAD-RELOADS.
157-UPDATE-GOOD-RELOADS.
IF GOOD-COUNTS(R, 9) = ZERO
ADD 1 TO GOOD-RELOAD-LINES.
ADD 1 TO
GOOD-COUNTS(R, G),
GOOD-COUNTS(R, 9),
GOOD-COUNTS(RM, G),
GOOD-COUNTS(RM, 9).
ADD THIS-DOWN-TIME TO
GOOD-TIMES(R, G),
GOOD-TIMES(R, 9),
GOOD-TIMES(RM, G),
GOOD-TIMES(RM, 9).
158-UPDATE-BAD-RELOADS.
IF BAD-COUNTS(R, 9) = ZERO
ADD 1 TO BAD-RELOAD-LINES.
ADD 1 TO
BAD-COUNTS(R, B),
BAD-COUNTS(R, 9),
BAD-COUNTS(RM, B),
BAD-COUNTS(RM, 9).
ADD THIS-DOWN-TIME TO
BAD-TIMES(R, B),
BAD-TIMES(R, 9),
BAD-TIMES(RM, B),
BAD-TIMES(RM, 9).
159-UPDATE-STOPCODES.
SET S TO 1.
SEARCH STOPCODE-STACK
WHEN STOPCODE-NAME(S) = OLD-RELOAD-WHY
ADD 1 TO STOPCODE-COUNT(S)
WHEN STOPCODE-NAME(S) = SPACE
MOVE OLD-RELOAD-WHY TO STOPCODE-NAME(S)
MOVE 1 TO STOPCODE-COUNT(S)
ADD 1 TO STOPCODE-LINES
WHEN S = SM - 1
ADD 1 TO STOPCODE-OVERFLOW
MOVE 'OVRFLO' TO STOPCODE-NAME(S)
ADD 1 TO STOPCODE-COUNT(S).
160-OUTPUT-RELOAD-LOG.
MOVE OLD-RELOAD-UP-SIXBIT TO IN-DATE-TIME.
PERFORM 950-STRING-DATE-TIME.
MOVE DATE-STRING-OUT TO DETAIL-LOAD-DATE.
MOVE TIME-STRING-OUT TO DETAIL-LOAD-TIME.
MOVE OLD-RELOAD-CRASH-SIXBIT TO IN-DATE-TIME.
PERFORM 950-STRING-DATE-TIME.
MOVE DATE-STRING-OUT TO DETAIL-CRASH-DATE.
MOVE TIME-STRING-OUT TO DETAIL-CRASH-TIME.
MOVE OLD-RELOAD-SIXBIT TO IN-DATE-TIME.
PERFORM 950-STRING-DATE-TIME.
MOVE DATE-STRING-OUT TO DETAIL-RELOAD-DATE.
MOVE TIME-STRING-OUT TO DETAIL-RELOAD-TIME
GENERATE RELOAD-DETAILS.
161-FIX-CRASH-TIMES.
IF LAST-CRASH-DAYS = NEW-RELOAD-CRASH-DAYS
AND LAST-CRASH-JIFFS = NEW-RELOAD-CRASH-JIFFS
MOVE OLD-RELOAD TO NEW-RELOAD-CRASH
MOVE OLD-RELOAD-SIXBIT TO NEW-RELOAD-CRASH-SIXBIT
ELSE
MOVE NEW-RELOAD-CRASH TO LAST-CRASH.
MOVE NEW-RELOAD-CRASH TO DJ-TWO.
MOVE OLD-RELOAD TO DJ-ONE.
PERFORM 930-SUB-DAY-JIFF.
MOVE DJ-OUT TO NEW-RELOAD-UPTIME.
MOVE OLD-RELOAD-SIXBIT TO NEW-RELOAD-UP-SIXBIT.
170-ACCUMULATE-DEVICES.
MOVE E TO E-SAVE.
SET E TO ZERO.
PERFORM 171-CALC-DEVICE-TIMES UNTIL E = E-SAVE.
SET E TO ZERO.
171-CALC-DEVICE-TIMES.
SET E UP BY 1.
MOVE DEVICE-STACK-SUBSYS(E) TO SU.
SET D TO 1.
SEARCH DEVICE-STATS
AT END
ADD 1 TO DEVICE-OVERFLOW
WHEN DEVICE-STACK-NAME(E) = STATS-DEVICE-NAME(D)
PERFORM 172-UPDATE-DEVICE
WHEN STATS-DEVICE-NAME(D) = SPACE
MOVE DEVICE-STACK-NAME(E) TO STATS-DEVICE-NAME(D)
MOVE SU TO STATS-SUBSYS-CODE(D)
PERFORM 172-UPDATE-DEVICE.
172-UPDATE-DEVICE.
IF LOGS-WANTED
PERFORM 173-MAKE-DEVICE-LOG.
IF DEVICE-STACK-TYPE(E) = 1
PERFORM 174-TURN-DEVICE-ON
ELSE
PERFORM 176-TURN-DEVICE-OFF.
173-MAKE-DEVICE-LOG.
MOVE TOTAL-RELOADS TO DETAIL-RELOAD-NUMBER.
ENTER MACRO REDERR USING
DEVICE-STACK-DAYS(E),DEVICE-STACK-JIFFS(E),
IN-DATE,IN-TIME,
GET-UDT-FUNCTION.
PERFORM 950-STRING-DATE-TIME.
MOVE DATE-STRING-OUT TO DETAIL-DEVICE-DATE.
MOVE TIME-STRING-OUT TO DETAIL-DEVICE-TIME.
IF DEVICE-STACK-TYPE(E) = 1
MOVE 'ON' TO DETAIL-DEVICE-ON-OFF
ELSE
MOVE 'OFF' TO DETAIL-DEVICE-ON-OFF.
MOVE DEVICE-STACK-NAME(E) TO DEVICE-STOPCODE-NAME.
MOVE SUBSYS-TABLE(SU) TO DETAIL-SUBSYS-NAME.
EXAMINE DEVICE-STOPCODE-NAME
REPLACING LEADING ZEROS BY SPACES.
GENERATE DEVICE-DETAILS.
174-TURN-DEVICE-ON.
IF SU < 3
ADD 1 TO STATS-CPU-MEM-ON-COUNT(D).
IF SU NOT = 3 OR STATS-DAYS-OFF(D) NOT = ZERO
MOVE DEVICE-STACK-ON-OFF(E) TO STATS-DEVICE-ON(D).
IF SU > 3 OR (SU = 3 AND STATS-DAYS-OFF(D) NOT = ZERO)
PERFORM 175-ADD-NEW-DEV-OUTAGE.
175-ADD-NEW-DEV-OUTAGE.
IF STATS-DAYS-OFF(D) = ZERO
MOVE OPERATING-CYCLE-START TO STATS-DEVICE-OFF(D)
ADD 1 TO
STATS-DEVICE-OUTAGE-COUNT(D),
SUBSYS-OUTAGE-COUNT(SU)
IF SUBSYS-OUTAGE-COUNT(SU) = 1
ADD 1 TO DEVICE-LINES.
MOVE STATS-DEVICE-ON(D) TO DJ-TWO.
MOVE STATS-DEVICE-OFF(D) TO DJ-ONE.
PERFORM 930-SUB-DAY-JIFF.
COMPUTE DEVICE-OUTAGE-TIME ROUNDED =
(D-OUT * 24) + (J-OUT / 10800).
ADD DEVICE-OUTAGE-TIME TO
STATS-DEVICE-OUTAGE-TIME(D),
SUBSYS-OUTAGE-TIME(SU).
MOVE SUBSYS-OUTAGE-TIME(SU) TO DETAIL-SUB-TOTAL.
IF LOGS-WANTED
GENERATE DEV-TIME-DET.
MOVE ZEROS TO
DEVICE-OUTAGE-TIME,
STATS-DAYS-ON(D),
STATS-DAYS-OFF(D).
176-TURN-DEVICE-OFF.
IF SU > 2 OR STATS-DAYS-OFF(D) = ZERO
MOVE DEVICE-STACK-ON-OFF(E) TO STATS-DEVICE-OFF(D).
ADD 1 TO
STATS-DEVICE-OUTAGE-COUNT(D),
SUBSYS-OUTAGE-COUNT(SU).
IF SUBSYS-OUTAGE-COUNT(SU) = 1
ADD 1 TO DEVICE-LINES.
180-START-UP-CYCLE.
MOVE 'Y' TO BEGIN-SEEN-FLAG.
MOVE HEADER-DATE-SIXBIT TO
IN-DATE,
OLD-RELOAD-SIXBIT.
PERFORM 960-STRING-DATE.
MOVE DATE-STRING-OUT TO RPT-BEGIN-DATE.
MOVE HEADER-CPU-NUMBER TO RPT-CPU-NUMBER.
MOVE HEADER-DATE-TIME TO
OPERATING-CYCLE-START,
OLD-RELOAD.
SET E TO ZERO.
185-FINALIZE-CYCLE.
MOVE 'Y' TO END-SEEN-FLAG.
MOVE HEADER-DATE-SIXBIT TO IN-DATE.
PERFORM 960-STRING-DATE.
MOVE DATE-STRING-OUT TO RPT-END-DATE.
MOVE HEADER-DATE-TIME TO OPERATING-CYCLE-END.
200-CALCULATE-AVAIL.
MOVE 'N' TO STOPCODES-SORTED-FLAG.
PERFORM 210-SORT-STOPCODES UNTIL STOPCODES-SORTED.
COMPUTE MEAN-RUN-TIME ROUNDED =
TOTAL-RUN-TIME / TOTAL-RELOADS.
COMPUTE MEAN-DOWN-TIME ROUNDED =
TOTAL-DOWN-TIME / TOTAL-RELOADS.
COMPUTE PERCENT-HOLD ROUNDED =
(1 - (BAD-TIMES(RM, 9) / OPERATING-CYCLE)) * 100.
MOVE PERCENT-HOLD TO SYSTEM-AVAILABILITY.
COMPUTE PERCENT-HOLD ROUNDED =
(1 - (BAD-TIMES(RM, 9) / (TOTAL-RUN-TIME + BAD-TIMES(RM, 9)))) * 100.
MOVE PERCENT-HOLD TO USER-AVAILABILITY.
COMPUTE STANDARD-DEVIATION ROUNDED =
((RUN-TIME-SQUARE / TOTAL-RELOADS) - (MEAN-RUN-TIME ** 2)) ** .5.
COMPUTE MTBF ROUNDED =
TOTAL-RUN-TIME / BAD-COUNTS(RM, 9).
COMPUTE SE-T1 ROUNDED =
((2.7182818) ** (0 - (.1 / MTBF))) * SYSTEM-AVAILABILITY.
COMPUTE SE-T2 ROUNDED =
((2.7182818) ** (0 - (.5 / MTBF))) * SYSTEM-AVAILABILITY.
COMPUTE SE-T3 ROUNDED =
((2.7182818) ** (0 - (1.0 / MTBF))) * SYSTEM-AVAILABILITY.
COMPUTE SE-T4 ROUNDED =
((2.7182818) ** (0 - (4.0 / MTBF))) * SYSTEM-AVAILABILITY.
210-SORT-STOPCODES.
MOVE 'Y' TO STOPCODES-SORTED-FLAG.
SET S TO 1.
SEARCH STOPCODE-STACK
WHEN S > 1 AND STOPCODE-COUNT(S) > STOPCODE-COUNT(S - 1)
PERFORM 211-SWITCH-CODES
WHEN STOPCODE-NAME(S) = SPACE
OR S = SM
NEXT SENTENCE.
211-SWITCH-CODES.
MOVE STOPCODE-STACK(S) TO STOPCODE-TEMP.
MOVE STOPCODE-STACK(S - 1) TO STOPCODE-STACK(S).
MOVE STOPCODE-TEMP TO STOPCODE-STACK(S - 1).
MOVE 'N' TO STOPCODES-SORTED-FLAG.
300-REPORT-AVAILABILITY.
OPEN OUTPUT AVAIL-REPORT.
INITIATE AVAIL-RPT.
GENERATE PAGE-HDR.
ADD
BACKWARDS-TIME,
BAD-RELOAD-CODE,
RELOAD-OVERFLOW,
DEVICE-OVERFLOW,
STOPCODE-OVERFLOW,
TO WARNING-COUNT.
IF WARNING-COUNT NOT = ZERO
PERFORM 310-PRINT-WARNINGS.
GENERATE CUSTOMER-LINE.
PERFORM 320-PRINT-SYSTEM-STATS.
IF BAD-RELOAD-LINES NOT = ZERO
PERFORM 325-PRINT-BAD-RELOADS.
IF GOOD-RELOAD-LINES NOT = ZERO
PERFORM 330-PRINT-GOOD-RELOADS.
IF DEVICE-LINES NOT = ZERO
PERFORM 335-PRINT-DEVICE-STATS.
IF STOPCODE-LINES NOT = ZERO
PERFORM 340-PRINT-STOPCODES.
TERMINATE AVAIL-RPT.
CLOSE AVAIL-REPORT.
310-PRINT-WARNINGS.
GENERATE WARNING-HDR.
IF BAD-RELOAD-CODE > ZERO
GENERATE INVALID-WHY.
IF RELOAD-OVERFLOW > ZERO
GENERATE R-OVER-MSG.
IF DEVICE-OVERFLOW > ZERO
GENERATE D-OVER-MSG.
IF STOPCODE-OVERFLOW > ZERO
GENERATE S-OVER-MSG.
IF BACKWARDS-TIME > ZERO
GENERATE TIME-REVERSE-MSG.
320-PRINT-SYSTEM-STATS.
MOVE TOTAL-RUN-TIME TO ROUNDER.
PERFORM 940-ROUND-A-NUMBER.
MOVE ROUNDER-OUT TO TOTAL-RUN-TIME.
MOVE TOTAL-DOWN-TIME TO ROUNDER.
PERFORM 940-ROUND-A-NUMBER.
MOVE ROUNDER-OUT TO TOTAL-DOWN-TIME.
GENERATE SYSTEM-STATS-HDR.
GENERATE SYS-STATS.
325-PRINT-BAD-RELOADS.
MOVE 2 TO REPORT-PHASE.
MOVE BAD-RELOAD-LINES TO PHASE-LINES.
PERFORM 390-PAGING-CHECK.
SET R TO 1.
PERFORM 326-PRINT-BAD-REL-LINES UNTIL RELOAD-NAME(R) = SPACE.
GENERATE DASH-LINE.
SET R TO RM.
PERFORM 326-PRINT-BAD-REL-LINES.
326-PRINT-BAD-REL-LINES.
SET B TO 1.
PERFORM 327-ROUND-BAD-REL-NUMBERS UNTIL B = 10.
MOVE BAD-COUNTS-TIMES(R) TO RELOAD-STATS-OUT.
PERFORM 370-GENERATE-RELOAD-LINE.
ADD 1 TO R.
327-ROUND-BAD-REL-NUMBERS.
MOVE BAD-TIMES(R, B) TO ROUNDER.
PERFORM 940-ROUND-A-NUMBER.
MOVE ROUNDER-OUT TO BAD-TIMES(R, B).
ADD 1 TO B.
330-PRINT-GOOD-RELOADS.
MOVE 3 TO REPORT-PHASE.
MOVE GOOD-RELOAD-LINES TO PHASE-LINES.
PERFORM 390-PAGING-CHECK.
SET R TO 1.
PERFORM 331-PRINT-GOOD-REL-LINES UNTIL RELOAD-NAME(R) = SPACE.
GENERATE DASH-LINE.
SET R TO RM.
PERFORM 331-PRINT-GOOD-REL-LINES.
331-PRINT-GOOD-REL-LINES.
SET G TO 1.
PERFORM 332-ROUND-GOOD-REL-NUMBERS UNTIL G = 10.
MOVE GOOD-COUNTS-TIMES(R) TO RELOAD-STATS-OUT.
PERFORM 370-GENERATE-RELOAD-LINE.
ADD 1 TO R.
332-ROUND-GOOD-REL-NUMBERS.
MOVE GOOD-TIMES(R, G) TO ROUNDER.
PERFORM 940-ROUND-A-NUMBER.
MOVE ROUNDER-OUT TO GOOD-TIMES(R, G).
ADD 1 TO G.
335-PRINT-DEVICE-STATS.
MOVE 4 TO REPORT-PHASE.
MOVE DEVICE-LINES TO PHASE-LINES.
PERFORM 390-PAGING-CHECK.
SET SU TO 1.
PERFORM 336-PRINT-A-SUBSYS UNTIL SU = 7.
336-PRINT-A-SUBSYS.
MOVE SUBSYS-TABLE(SU) TO DEVICE-STOPCODE-NAME.
MOVE SUBSYS-OUTAGE-TIME(SU) TO ROUNDER.
PERFORM 940-ROUND-A-NUMBER.
MOVE ROUNDER-OUT TO DEVICE-OUTAGE-TIME.
MOVE SUBSYS-OUTAGE-COUNT(SU) TO DEVICE-STOPCODE-COUNT.
ADD 1 TO SU.
IF DEVICE-STOPCODE-COUNT > ZERO
GENERATE DEV-STOP-STATS
PERFORM 391-TEST-END-OF-PAGE.
340-PRINT-STOPCODES.
MOVE 5 TO REPORT-PHASE.
MOVE STOPCODE-LINES TO PHASE-LINES.
PERFORM 390-PAGING-CHECK.
SET S TO 1.
PERFORM 341-PRINT-A-STOPCODE UNTIL STOPCODE-NAME(S) = SPACE.
341-PRINT-A-STOPCODE.
MOVE STOPCODE-STACK(S) TO DEVICE-STOPCODE-OUT.
GENERATE DEV-STOP-STATS.
PERFORM 391-TEST-END-OF-PAGE.
ADD 1 TO S.
370-GENERATE-RELOAD-LINE.
MOVE RELOAD-NAME-VERSION(R) TO RELOAD-NAME-VERSION-OUT.
IF RELOAD-TOT-COUNT > ZERO
GENERATE RELOAD-STATS.
PERFORM 391-TEST-END-OF-PAGE.
390-PAGING-CHECK.
ADD LINE-COUNTER OF AVAIL-RPT, OVERHEAD-LINES(REPORT-PHASE) TO
PHASE-LINES.
IF PHASE-LINES > 50
PERFORM 392-TO-NEXT-PAGE
ELSE
PERFORM 393-PRINT-SUB-HEADING.
391-TEST-END-OF-PAGE.
IF LINE-COUNTER OF AVAIL-RPT > 59
PERFORM 392-TO-NEXT-PAGE.
392-TO-NEXT-PAGE.
GENERATE PAGE-HDR.
PERFORM 393-PRINT-SUB-HEADING.
393-PRINT-SUB-HEADING.
IF REPORT-PHASE = 1
GENERATE SYSTEM-STATS-HDR
ELSE IF REPORT-PHASE = 2
GENERATE BAD-RELOADS-HDR
ELSE IF REPORT-PHASE = 3
GENERATE GOOD-RELOADS-HDR
ELSE IF REPORT-PHASE = 4
GENERATE DEVICE-HDR
ELSE IF REPORT-PHASE = 5
GENERATE STOPCD-HDR.
800-FIND-FILE.
MOVE START-READ TO REDERR-FUNCTION.
PERFORM 805-FIND-DEFAULT-IN.
IF NOT MAXIMUM-EXTENSION
IF NO-FILE OR END-OF-FILE
IF NO-FILE
IF FILE-MISSING
ADD 1 TO MISSING-EXT-COUNT
ELSE
MOVE "Y" TO FILE-MISSING-FLAG
MOVE EXTENSION-CHECK TO LAST-EXT-NUMBER
ELSE
MOVE STOP-READ TO REDERR-FUNCTION
PERFORM 910-CALL-REDERR
ELSE
IF FILE-MISSING
MOVE 'N' TO FILE-MISSING-FLAG
DISPLAY '%FILE MISSING -- (A',LAST-EXT-NUMBER,')'
IF MISSING-EXT-COUNT > ZERO
SUBTRACT 1 FROM EXTENSION-CHECK GIVING MISSING-EXT-COUNT
DISPLAY ' THRU --(A',MISSING-EXT-COUNT,')'
MOVE ZERO TO MISSING-EXT-COUNT.
MOVE NEXT-READ TO REDERR-FUNCTION.
805-FIND-DEFAULT-IN.
ADD 1 TO EXTENSION-CHECK.
MOVE EXTENSION-CHECK TO IN-EXT-LAST.
IF IN-EXT-3 = 8
ADD 2 TO EXTENSION-CHECK
MOVE EXTENSION-CHECK TO IN-EXT-LAST.
IF NOT MAXIMUM-EXTENSION
PERFORM 910-CALL-REDERR
IF NOT NO-FILE
MOVE IN-FILE-EXT TO IN-DEFAULT-EXT.
900-RIGHT-MOVE.
EXAMINE RIGHT-WORD TALLYING ALL SPACES.
COMPUTE FIRST-CHARACTER = 6 - TALLY.
COMPUTE LAST-CHARACTER = TALLY + FIRST-CHARACTER.
IF TALLY = ZERO
MOVE ZERO TO FIRST-CHARACTER.
PERFORM 905-MOVE-RIGHT UNTIL FIRST-CHARACTER = ZERO.
905-MOVE-RIGHT.
MOVE RIGHT-CHARACTER(FIRST-CHARACTER) TO
RIGHT-CHARACTER(LAST-CHARACTER).
MOVE SPACE TO RIGHT-CHARACTER(FIRST-CHARACTER).
SUBTRACT 1 FROM
FIRST-CHARACTER,
LAST-CHARACTER.
910-CALL-REDERR.
ENTER MACRO REDERR USING
BEGIN-DATE, END-DATE,
ENTRY-BUFFER, INPUT-LOCATOR,
REDERR-FUNCTION,
CODE-46,
CODE-47,
CODE-15,
CODE-44.
920-ADD-DAY-JIFF.
MOVE ZERO TO D-OUT.
ADD J-1, J-2 GIVING J-OUT.
IF J-OUT > 259199
MOVE 1 TO D-OUT
COMPUTE J-OUT = J-OUT - 259200.
ADD D-1, D-2 TO D-OUT.
930-SUB-DAY-JIFF.
SUBTRACT J-1 FROM J-2 GIVING J-OUT.
SUBTRACT D-1 FROM D-2 GIVING D-OUT.
IF J-1 > J-2 AND D-2 > D-1
SUBTRACT 1 FROM D-OUT
COMPUTE J-OUT = (259200 - J-1) + J-2.
IF (D-1 > D-2) OR (D-1 = D-2 AND J-1 > J-2)
ADD 1 TO BACKWARDS-TIME.
940-ROUND-A-NUMBER.
MOVE ZERO TO ROUNDER-OUT.
COMPUTE ROUNDER-OUT ROUNDED =
ROUNDER + ROUNDER-OUT.
950-STRING-DATE-TIME.
PERFORM 960-STRING-DATE.
PERFORM 970-STRING-TIME.
960-STRING-DATE.
STRING IN-DAY,'-',MONTH-NAME(IN-MO),'-',IN-YR
DELIMITED BY SIZE
INTO DATE-STRING-OUT.
970-STRING-TIME.
STRING IN-HR,':',IN-MI,':',IN-SE
DELIMITED BY SIZE
INTO TIME-STRING-OUT.
* ----- RUNNING THE PROGRAM -----
HELP-PARAGRAPH-1.
* OPTIONS AVAILABLE
DISPLAY 'REPORTS SYSTEM AVAILABILITY BY TRANSLATING AVAIL.SYS OR AVAIL.A??'.
DISPLAY 'OPTIONS:'.
DISPLAY ' 1. REPORT A SINGLE WEEK (ONE AVAIL FILE)'.
DISPLAY ' 2. REPORT MULTIPLE WEEKS IN ONE LISTING'.
DISPLAY ' 3. GENERATE MULTIPLE REPORTS (ONE FOR EACH AVAIL FILE)'.
DISPLAY 'DEFAULT: OPTION 1'.
HELP-PARAGRAPH-2.
* SPECIFYING DATE LIMITS
DISPLAY 'IF OPTION 2 IS SELECTED, THE USER MAY SPECIFY A BEGINNING AND'.
DISPLAY 'ENDING DATE FOR THE REPORT. THESE DEPEND ON THE FIRST'.
DISPLAY 'INPUT FILE SELECTED. FOR EXAMPLE: IF YOU WANT TO START THE'.
DISPLAY 'REPORT AT JUNE 2, 1979; YOU SHOULD NOT SPECIFY AN INPUT FILE'.
DISPLAY 'YOUNGER THAN THAT WHEN YOU ARE ASKED TO SUPPLY THE FILE SPEC.'.
DISPLAY 'NORMALLY, YOU WILL EITHER USE DATE-LIMITS OR FIRST INPUT FILE'.
DISPLAY 'TO READ -- BUT NOT BOTH.'.
HELP-PARAGRAPH-3.
* THE BEGINNING DATE
DISPLAY 'IF NOT SPECIFIED, THE REPORT BEGINS AT THE FIRST MONITOR LOAD'.
DISPLAY 'IN THE SELECTED INPUT FILE. (FILE SELECTION COMES AFTER DATE'.
DISPLAY 'SELECTION).'.
HELP-PARAGRAPH-4.
* THE ENDING DATE
DISPLAY 'IF NOT SPECIFIED, THE REPORT ENDS AT THE LAST RELOAD OF'.
DISPLAY 'THE LAST AVAIL FILE IN THE SELECTED PPN.'.
HELP-PARAGRAPH-5.
* THE FILE SPECIFICATION
DISPLAY 'RULES FOR INPUT OF FILE SPECIFICATION.'.
DISPLAY ' 1. OUTPUT DEVICE IF SPECIFIED MUST BE "DSK".'.
DISPLAY ' 2. OUTPUT PPN CANNOT BE SPECIFIED (MUST BE YOURS)'.
DISPLAY ' 3. ONLY ONE INPUT FILE CAN BE SELECTED'.
DISPLAY 'INPUT DEFAULTS DEPEND ON YOUR REPORT OPTION: OPTIONS 2 & 3'.
DISPLAY 'ASSUME "SYS:AVAIL.A01" (THE OLDEST FILE); OPTION 1 ASSUMES'.
DISPLAY 'YOU WANT TO SEE THE FILE FROM LAST WEEK. FOR OPTION 3, THE'
DISPLAY 'OUTPUT FILE EXTENSIONS WILL BE THE SAME AS THE INPUT FILES'.
DISPLAY 'THEY REPORT.'.
HELP-PARAGRAPH-6.
* DETAILED LISTINGS
DISPLAY 'IF YOU CHOOSE OPTIONS 1 OR 2, YOU MAY ALSO PRODUCE DETAILED'.
DISPLAY 'LISTING FILES; ONE FOR RELOADS AND ONE FOR DEVICE STATUS CHANGES.'.
DISPLAY 'THESE FILES WILL SHARE THE FILE NAME OF THE MAIN REPORT. THE FILE'.
DISPLAY 'EXTENSION FOR DETAILED RELOADS WILL BE "DE1" AND FOR DEVICE'.
DISPLAY 'CHANGES "DE2". THE DEFAULT IS NO DETAILED LISTINGS.'.
HELP-PARAGRAPH-7.
* SPEEDING IT UP
DISPLAY 'IF, WHEN YOU SEE THE FIRST PROMPT, YOU TYPE THE OPTION FOLLOWED'.
DISPLAY 'BY AN "F" (FOR FAST), NO QUESTIONS ARE ASKED AND ALL DEFAULTS'.
DISPLAY 'ARE TAKEN.'.
DISPLAY ' EXAMPLE: 1F -- REPORTS CONTENTS OF SYS:AVAIL.SYS'.
DISPLAY ' IN AVAIL.RPT AND GIVES NO DETAILED LISTINGS.'.
* ----- REPORT CONTENTS -----
*
* THIS SECTION DESCRIBES THE FORMULAS USED IN THE MAIN REPORT.
*
*SYSTEM AVAILABILITY - THIS IS COMPUTED USING THE FOLLOWING FORMULA.
* S.A. = 1.0 - (TOTAL DOWN TIME / OPERATIONAL CYCLE)
* WHERE DOWN TIME IS THE TIME 'CHARGED AGAINST AVAIL.' AS DETERMINED BY
*THE WHY RELOAD ANSWERS.
* OPERATIONAL CYCLE IS THE CLOCK HOUR TIME PERIOD OF THE INPUT FILE COMPUTED
*FROM THE FIRST SYSTEM RELOAD ENTRY TO THE LAST CRASH INCLUDED IN THE FILE.
*
*USER AVAILABILITY - THIS IS COMPUTED BY
* U.A. = 1.0 - (TOTAL DOWN TIME/(TOTAL DOWN TIME + TOTAL MONITOR RUN TIME))
*
*MONITOR RUN STATISTICS ARE COMPUTED USING THE TOTAL NUMBER OF RELOADS INCLUDING
*BOTH THOSE 'CHARGED TO DOWN TIME' AND THOSE 'NOT CHARGED.'
*
*SYSTEM EFFECTIVENESS CONSIDERS BOTH THE PROBABILITY OF THE SYSTEM BEING UP
*AT TIME ZERO (SYSTEM AVAILIBILITY) AND THE PROBABILITY OF THE SYSTEM STAYING UP
*(SYSTEM RELIABILITY)FOR SOME TIME PERIOD "T".
* 4 VALUES ARE CALCULATED FOR TIME PERIODS OF .1HRS,.5HRS, 1.0 HRS, AND
*4.0 HRS USING THE FORMULA:
*
* S.E. = (1.0 - (DOWN TIME/OPERATIONAL CYCLE) * (e ** (-T/MTBF))
*
* MTBF = TOTAL MONITOR RUN TIME / # OF RELOADS CHARGED TO DOWN TIME
* IT IS ASSUMED THAT USUALLY NO USERS JOBS ARE STILL ACTIVE WHEN THE
* SYSTEM IS BROUGHT DOWN INTENTIONALLY.
*
*