AZXZSUP5 ;SUPPORT DATABASE PROGRAM[ 08/25/92 8:56 AM ]
;05/07/92 JOHN H. LYNCH
;
;THIS ROUTINE WILL ALLOW A USER TO PRINT OUT
;A LIST OF PROBLEM CODES CURRENTLY BEING USED
;WITH THE SUPPORT LOG DATABASE. A KEY IS GIVEN
;FOR AN EASY UNDERSTANDING OF HOW THE PROBLEM CODES
;ARE USED, THEN A LIST OF THE PROBLEM CODES IN
;THEIR CATAGORIES ARE GIVEN.
MAIN ;AZXZSUP5 PROGRAM CONTROL
;INITIALIZE LOCAL VARIABLES
S FILE="1991011" ;FILE NUMBER (PROBCODE)
W @IOF ;CLEAR SCREEN
W !!!,"Problem Code Print..."
KEYPRNT ;SUB-ROUTINE OF MAIN
W !!,"Would you like to print out a Key"
R !,"for the Problem Code Print: Y// ",KEY
I KEY="^" G KILLVARS
I KEY="?" W !!,"The ""Problem Code Key Print"" gives a brief description",!,"of the current types of problem codes and their sub-classes." G KEYPRNT
I KEY="" S KEY="Y"
D SETDATE ;CALL SETDATE SUB-ROUTINE
D ^%ZIS U IO ;CALL DEVICE
I KEY="Y" D PRNTKEY ;CALL PRINTKEY SUB-ROUTINE
D PRNTCODE ;CALL PRINTOUT SUB-ROUTINE
X ^%ZIS("C") ;CLOSE DEVICE
R !!,"Do you want to print another Problem Code List? Y// ",YN
I YN="" S YN="Y"
I YN="Y" G MAIN
KILLVARS ;SUB-ROUTINE OF MAIN
;K
Q
SETDATE ;SET DATE = CURRENT DATE FOR REPORT
S Y=DT ;SET Y TO CURRENT DATE FOR REPORT OUTPUT
D DD^%DT ;CONVERT CURRENT DATE
S DATE=Y ;REPORT DATE
Q
PRNTKEY ;PRINT OUT KEY FOR PROBLEM CODE PRINT
W !,"________________________________________________________________________________",!
W !,"Problem Code Key Print",?63,DATE
W !,"________________________________________________________________________________",!
W !!,"A = ADMINISTRATIVE PROBLEM"
W !!,"F = FTS SUPPORT CALL"
W !!,"H = HARDWARE PROBLEM"
W !!,"HP = HARDWARE PROCUREMENT"
W !!,"M = MUMPS SUPPORT CALL"
W !!,"ME = MUMPS ERROR"
W !!,"MSW = MUMPS SOFTWARE ADDED"
W !!,"O = OPERATING SYSTEM PROBLEM"
W !!,"S = SOFTWARE PACKAGE PROBLEM"
W !!,"U = UNIX SUPPORT CALL"
W !!,"UE = UNIX ERROR"
W !!!,"The ""Problem Code Key Print"" helps in identifying a sub-class"
W !,"of the current problem codes. Every problem begins with a prefix"
W !,"of up to three letters that helps identify its sub-class. As an"
W !,"example, any problem code that starts with, ME, would be identified"
W !,"with the sub-class for a problem which involved an error in mumps"
W !,"(M=Mumps, E=Error)."
H 2
W @IOF ;CLEAR SCREEN (ADVANCE A PAGE)
Q
PRNTCODE ;PRINT OUT PROBLEM CODE PRINT
;INITIALIZE LOCAL VARIABLES
S COUNT=1 ;COUNT = CURRENT LABEL NUMBER TO PRINT
S INUM=0 ;INTERNAL ENTRY NUMBER
S CODE=0 ;START CODE AT BEGINNING OF PROBCODES
W @IOF ;CLEAR SCREEN WHEN OUTPUT TO TERMINAL
W !,"________________________________________________________________________________",!
W !,"Problem Code Print",?63,DATE
W !,"Code",?13,"Description"
W !,"________________________________________________________________________________",!
F S INUM=0,CODE=$O(^DIZ(FILE,"B",CODE)) Q:CODE="" D SETINUM D CHKHEAD D PRNTOUT
Q
SETINUM ;SET THE INTERNAL NUMBER FOR EACH ENTRY
S INUM=$O(^DIZ(FILE,"B",CODE,INUM))
Q
CHKHEAD ;CHECK TO SEE IF A NEW HEADING IS NEEDED
;FOR EACH PROBCODE TYPE (SEE KEY)
I ($F(CODE,"A",1)=2)&(COUNT=1) S COUNT=COUNT+1 W !!,"Administrative Problem Codes...",!
I ($F(CODE,"F",1)=2)&(COUNT=2) S COUNT=COUNT+1 W !!,"FTS Problem Codes...",!
I ($F(CODE,"H",1)=2)&(COUNT=3) S COUNT=COUNT+1 W !!,"Hardware Problem Codes...",!
I ($F(CODE,"M",1)=2)&(COUNT=4) S COUNT=COUNT+1 W !!,"Mumps Problem Codes...",!
I ($F(CODE,"O",1)=2)&(COUNT=5) S COUNT=COUNT+1 W !!,"Operating System Problem Codes...",!
I ($F(CODE,"S",1)=2)&(COUNT=6) S COUNT=COUNT+1 W !!,"Software Problem Codes...",!
I ($F(CODE,"U",1)=2)&(COUNT=7) S COUNT=COUNT+1 W !!,"Unix Problem Codes...",!
Q
PRNTOUT ;PRINT OUT ACTUAL DATA
W !,$P(^DIZ(FILE,INUM,0),U),?13,$P(^DIZ(FILE,INUM,0),U,2)
Q
AZXZSUP5 ;SUPPORT DATABASE PROGRAM[ 08/25/92 8:56 AM ]
+1 ;05/07/92 JOHN H. LYNCH
+2 ;
+3 ;THIS ROUTINE WILL ALLOW A USER TO PRINT OUT
+4 ;A LIST OF PROBLEM CODES CURRENTLY BEING USED
+5 ;WITH THE SUPPORT LOG DATABASE. A KEY IS GIVEN
+6 ;FOR AN EASY UNDERSTANDING OF HOW THE PROBLEM CODES
+7 ;ARE USED, THEN A LIST OF THE PROBLEM CODES IN
+8 ;THEIR CATAGORIES ARE GIVEN.
+9 MAIN ;AZXZSUP5 PROGRAM CONTROL
+1 ;INITIALIZE LOCAL VARIABLES
+2 ;FILE NUMBER (PROBCODE)
SET FILE="1991011"
+3 +4 ;CLEAR SCREEN
WRITE @IOF
+5 WRITE !!!,"Problem Code Print..."
KEYPRNT ;SUB-ROUTINE OF MAIN
+1 WRITE !!,"Would you like to print out a Key"
+2 READ !,"for the Problem Code Print: Y// ",KEY
+3 IF KEY="^"
GOTO KILLVARS
+4 IF KEY="?"
WRITE !!,"The ""Problem Code Key Print"" gives a brief description",!,"of the current types of problem codes and their sub-classes."
GOTO KEYPRNT
+5 IF KEY=""
SET KEY="Y"
+6 ;CALL SETDATE SUB-ROUTINE
DO SETDATE
+7 ;CALL DEVICE
DO ^%ZIS
USE IO
+8 ;CALL PRINTKEY SUB-ROUTINE
IF KEY="Y"
DO PRNTKEY
+9 ;CALL PRINTOUT SUB-ROUTINE
DO PRNTCODE
+10 ;CLOSE DEVICE
XECUTE ^%ZIS("C")
+11 +12 READ !!,"Do you want to print another Problem Code List? Y// ",YN
+13 IF YN=""
SET YN="Y"
+14 IF YN="Y"
GOTO MAIN
KILLVARS ;SUB-ROUTINE OF MAIN
+1 ;K
+2 QUIT
+3 SETDATE ;SET DATE = CURRENT DATE FOR REPORT
+1 ;SET Y TO CURRENT DATE FOR REPORT OUTPUT
SET Y=DT
+2 ;CONVERT CURRENT DATE
DO DD^%DT
+3 ;REPORT DATE
SET DATE=Y
+4 QUIT
+5 PRNTKEY ;PRINT OUT KEY FOR PROBLEM CODE PRINT
+1 +2 WRITE !,"________________________________________________________________________________",!
+3 WRITE !,"Problem Code Key Print",?63,DATE
+4 WRITE !,"________________________________________________________________________________",!
+5 WRITE !!,"A = ADMINISTRATIVE PROBLEM"
+6 WRITE !!,"F = FTS SUPPORT CALL"
+7 WRITE !!,"H = HARDWARE PROBLEM"
+8 WRITE !!,"HP = HARDWARE PROCUREMENT"
+9 WRITE !!,"M = MUMPS SUPPORT CALL"
+10 WRITE !!,"ME = MUMPS ERROR"
+11 WRITE !!,"MSW = MUMPS SOFTWARE ADDED"
+12 WRITE !!,"O = OPERATING SYSTEM PROBLEM"
+13 WRITE !!,"S = SOFTWARE PACKAGE PROBLEM"
+14 WRITE !!,"U = UNIX SUPPORT CALL"
+15 WRITE !!,"UE = UNIX ERROR"
+16 WRITE !!!,"The ""Problem Code Key Print"" helps in identifying a sub-class"
+17 WRITE !,"of the current problem codes. Every problem begins with a prefix"
+18 WRITE !,"of up to three letters that helps identify its sub-class. As an"
+19 WRITE !,"example, any problem code that starts with, ME, would be identified"
+20 WRITE !,"with the sub-class for a problem which involved an error in mumps"
+21 WRITE !,"(M=Mumps, E=Error)."
+22 HANG 2
+23 ;CLEAR SCREEN (ADVANCE A PAGE)
WRITE @IOF
+24 QUIT
+25 PRNTCODE ;PRINT OUT PROBLEM CODE PRINT
+1 ;INITIALIZE LOCAL VARIABLES
+2 ;COUNT = CURRENT LABEL NUMBER TO PRINT
SET COUNT=1
+3 ;INTERNAL ENTRY NUMBER
SET INUM=0
+4 ;START CODE AT BEGINNING OF PROBCODES
SET CODE=0
+5 +6 ;CLEAR SCREEN WHEN OUTPUT TO TERMINAL
WRITE @IOF
+7 WRITE !,"________________________________________________________________________________",!
+8 WRITE !,"Problem Code Print",?63,DATE
+9 WRITE !,"Code",?13,"Description"
+10 WRITE !,"________________________________________________________________________________",!
+11 FOR
SET INUM=0
SET CODE=$ORDER(^DIZ(FILE,"B",CODE))
IF CODE=""
QUIT
DO SETINUM
DO CHKHEAD
DO PRNTOUT
+12 QUIT
+13 SETINUM ;SET THE INTERNAL NUMBER FOR EACH ENTRY
+1 SET INUM=$ORDER(^DIZ(FILE,"B",CODE,INUM))
+2 QUIT
+3 CHKHEAD ;CHECK TO SEE IF A NEW HEADING IS NEEDED
+1 ;FOR EACH PROBCODE TYPE (SEE KEY)
+2 IF ($FIND(CODE,"A",1)=2)&(COUNT=1)
SET COUNT=COUNT+1
WRITE !!,"Administrative Problem Codes...",!
+3 IF ($FIND(CODE,"F",1)=2)&(COUNT=2)
SET COUNT=COUNT+1
WRITE !!,"FTS Problem Codes...",!
+4 IF ($FIND(CODE,"H",1)=2)&(COUNT=3)
SET COUNT=COUNT+1
WRITE !!,"Hardware Problem Codes...",!
+5 IF ($FIND(CODE,"M",1)=2)&(COUNT=4)
SET COUNT=COUNT+1
WRITE !!,"Mumps Problem Codes...",!
+6 IF ($FIND(CODE,"O",1)=2)&(COUNT=5)
SET COUNT=COUNT+1
WRITE !!,"Operating System Problem Codes...",!
+7 IF ($FIND(CODE,"S",1)=2)&(COUNT=6)
SET COUNT=COUNT+1
WRITE !!,"Software Problem Codes...",!
+8 IF ($FIND(CODE,"U",1)=2)&(COUNT=7)
SET COUNT=COUNT+1
WRITE !!,"Unix Problem Codes...",!
+9 QUIT
+10 PRNTOUT ;PRINT OUT ACTUAL DATA
+1 WRITE !,$PIECE(^DIZ(FILE,INUM,0),U),?13,$PIECE(^DIZ(FILE,INUM,0),U,2)
+2 QUIT