.; Put this file into [1,6] and rename it LOGIN.CMD
.; The run ACNT and make an account entry with the name ERROR
.; and password of your choice. Then when you want an error
.; report you just log into the ERROR account and answer the questions.
.;
.; ORIGINALLY FROM THE UNIVERSITY OF TORONTO
.; But added to periodically by M.R Brown TARLUG P.O. Box 2000 Downsview Ontario
; LOGIN.CMD> EXECUTING - IDENT /V2.0/
;
.ASK SKP Do you want to skip error analysis
.IFT SKP /
.ENABLE GLOBAL
.ENABLE SUBSTITUTION
;			ERROR LOGGING ANALYSIS
;	THIS PROCEDURE WILL GENERATE A REPORT (ERRLOG.LST) SHOWING
;	ALL SYSTEM AND HARDWARE ERRORS WHICH OCCURRED DURING A
;	SPECIFIED PERIOD OF TIME. SOME OPERATOR INPUT IS REQUIRED.
;
.SETS NL ""
; ERROR LOGGING IS TERMINATED TO ENSURE INTEGRITY OF LOG FILES
.ENABLE QUIET
.IFNINS ...ERF INS $ERF/PRI=200.
ERF
.WAIT ERRLOG
;
;
;
.IFNINS ERRLOG INS $ERL/PRI=200.
RUN ERRLOG
.WAIT ERRLOG
.DISABLE QUIET
;
;
;
;	AT THIS POINT THE OPERATOR IS TO ENTER THE APPROPRIATE
; TIME CONSTRAINTS FOR THE CURRENT LOG ANALYSIS.  IT IS ALWAYS
; CONVENIENT TO HIT RETURN (CURRENT TIME DEFAULT) WHEN SPECIFYING
; THE STOP ANALYSIS DATE-TIME PAIR.
;
.LB1:.ASKS STIME ENTER START TIME OF DATA TO BE ANALYSED HH:MM:SS (DEFAULT IS MIDNIGHT)
.IF STIME = NL .SETS STIME "00:00:00"
; Start time set to 'STIME'
.GOTO FIRST
.LB2:
; Sorry, I can't default on this one
.FIRST:
.ASKS SDATE ENTER START DATE OF DATA TO BE ANALYSED (DD-MON-YR)
.IF SDATE = NL .GOTO LB2
; Start date set to 'SDATE'
.SETS ESW ""
.SETS COL ""
.SETS ETIME ""
;
.LB3:.ASKS ETIME ENTER STOP TIME OF ANALYSIS (HH:MM:SS OR <RETURN>)
.SETS EDATE ""
.IF ETIME = NL .GOTO DEF
.LB4:.ASKS EDATE ENTER STOP DATE OF ANALYSIS (DD-MON-YR)
.IF EDATE = NL .GOTO LB3
.SETS ESW "/END:"
.SETS COL ":"
.DEF:;
.BEGOP:
;
; There are several options that can be selected for the report
;  SYS  select system entries
;  HDW  select hardware errors
;  TMO  select interrupt timeout errors
;  SUM  give a summary report only
;  DEV  select errors on a device or type of device
;
.ASKS OPT   Type the option <CR> gives all errors
.SETS OPN ""
.IF OPT = "" .SETS OPN "/RP"
.IF OPT = "" .GOTO ENDOP
.IF OPT = "SYS" .SETS OPN "/RP:SYS
.IF OPT = "SYS" .GOTO ENDOP
.IF OPT = "HDW" .SETS OPN "/RP:HDW"
.IF OPT = "HDW" .GOTO ENDOP
.IF OPT = "TMO" .SETS OPN "/RP:TMO"
.IF OPT = "TMO" .GOTO ENDOP
.IF OPT = "SUM" .SETS OPN "/SU"
.IF OPT = "SUM" .GOTO ENDOP
.IF OPT = "DEV" .ASKS D Which device (no colon) (leave off unit number to select a class)
.IF OPT = "DEV" .SETS OPN "/DV:"+D
.IF OPT = "DEV" .GOTO ENDOP
; I guess I can't recognize the command (use capital letters remember).
; Lets try again.
.GOTO BEGOP
.ENDOP:
.IFNINS ...PSE .SETT NOPSE
.ENABLE QUIET
.IFT NOPSE INS $PSE/INC=10000
.DISABLE QUIET
;
;	WHEN THE PSE> PROMPT APPEARS, HIT <RETURN>, THEN ON THE SECOND
;	APPEARANCE OF PSE> TYPE CTRL Z (^Z).
;
.ENABLE QUIET
PSE
.DISABLE QUIET
;
; Thinking....
;
.ENABLE QUIET
.IFT NOPSE REM ...PSE
INS $SYE/TASK=...LOG/PAR=GEN
LOG /-SP='OPN'/BEG:'SDATE':'STIME''ESW''EDATE''COL''ETIME'
REM ...LOG
PIP ERRLOG.LST/PU
.ASK CC REPORT TO YOUR TERMINAL
.IFT CC PIP TI:=ERRLOG.LST
.SETF SPL
.SETF DEL
.ASK SPL SPOOL REPORT
.ASK DEL DELETE REPORT
.IFF SPL .AND .IFT DEL PIP ERRLOG.LST;*/DE
.IFT SPL .AND .IFF DEL PRI ERRLOG.LST
.IFT SPL .AND .IFT DEL PRI ERRLOG.LST/DELETE
.ASK ERR DO YOU WANT ERROR LOGGING RESTARTED
.IFT ERR RUN $ERL
.XQT PIP *.*;*/TR
.DISABLE QUIET
;
; TO INVOKE THIS UTILITY MANUALLY, TYPE @LOGIN
;
/
