AZXZSUP1 ;SUPPDB SUPPORT LOG NUMBER DELETE PROGRAM [ 05/01/95 1:25 PM ]
;04/03/92 JOHN H. LYNCH
;
;THIS ROUTINE WILL ALLOW A USER TO PULL UP
;A SUPPORT LOG NUMBER'S (IF IT EXISTS) DATA
;AND DELETE IT IF THEY SO CHOOSE.
PASSWD ;CHECK FOR SECURITY ACCESS
W @IOF
R !!!!,"Please enter password: ",PASS
I PASS="AaBbCc" D MAIN
K PASS
Q
MAIN ;AZXZSUP1 PROGRAM CONTROL
W @IOF ;CLEAR SCREEN
;SET LOCAL VARIABLES
S DIE="1991012" ;SET EDIT FILE NUMBER
S DIC="^DIZ(1991012," ;SET LOOK-UP FILE NUMBER
S INUM=$P(^DIZ(DIE,0),U,3) ;CURRENT INTERNAL NUMBER
D SUPPNUM
K DIE,DIC,INUM,DNUM,PIEC,DA,DR,YN
Q
SUPPNUM R !!,"Select Support Number to Delete: ",DNUM
;CHECK FOR "^" TO QUIT OR "?" FOR HELP
I (DNUM="^")!(DNUM="") Q
I DNUM="?" W !!,"Please enter the support number you would like to delete." G SUPPNUM
;CHECK TO SEE IF INPUT IS GREATER THAN CURRENT ENTRY NUMBER
I DNUM>INUM W !!,"Support Number, ",DNUM,", Does Not Exist!" H 3 G MAIN
W ! ;SKIP LINE
;CHECK TO SEE IF SUPPORT NUMBER HAS ALREADY BEEN DELETED
S PIEC=0
I '$O(^DIZ(DIE,"B",DNUM,PIEC)) W !!,"Support Number, ",DNUM,", Has already been deleted!" H 3 G MAIN
S DA=DNUM ;SET INTERNAL NUMBER TO USER INPUT
S DR=".01:7" ;SET SUBSCRIPTS TO BE VIEWED
L ^DIZ(DIE,DA):0 I '$T W !!,"Record has been locked, try again later!" H 3 G MAIN
D EN^DIQ ;DO DATA DISPLAY OF GIVEN SUPPORT NUMBER
W !!,"Do you want to continue to delete Support Number, ",DNUM,"? N//"
R YN
I YN'="Y" L G MAIN ;IF "N" UNLOCK RECORD AND GOTO MAIN
R !,"Are you sure? N//",YN
I YN'="Y" L G MAIN ;IF "N" UNLOCK RECORD AND GOTO MAIN
W !!,"Deleting Support Number, ",DA,", one moment please..." H 1
S DR=".01///@" ;SET TO DELETE SUPPORT NUMBER (.01 FIELD)
D ^DIE ;CALL EDIT IN FILEMAN FOR DELETE
L ;UNLOCK RECORD
G MAIN ;RUN DELETE PROGRAM AGAIN
Q
AZXZSUP1 ;SUPPDB SUPPORT LOG NUMBER DELETE PROGRAM [ 05/01/95 1:25 PM ]
+1 ;04/03/92 JOHN H. LYNCH
+2 ;
+3 ;THIS ROUTINE WILL ALLOW A USER TO PULL UP
+4 ;A SUPPORT LOG NUMBER'S (IF IT EXISTS) DATA
+5 ;AND DELETE IT IF THEY SO CHOOSE.
+6 PASSWD ;CHECK FOR SECURITY ACCESS
+1 WRITE @IOF
+2 READ !!!!,"Please enter password: ",PASS
+3 IF PASS="AaBbCc"
DO MAIN
+4 KILL PASS
+5 QUIT
+6 MAIN ;AZXZSUP1 PROGRAM CONTROL
+1 ;CLEAR SCREEN
WRITE @IOF
+2 ;SET LOCAL VARIABLES
+3 ;SET EDIT FILE NUMBER
SET DIE="1991012"
+4 ;SET LOOK-UP FILE NUMBER
SET DIC="^DIZ(1991012,"
+5 ;CURRENT INTERNAL NUMBER
SET INUM=$PIECE(^DIZ(DIE,0),U,3)
+6 +7 DO SUPPNUM
+8 KILL DIE,DIC,INUM,DNUM,PIEC,DA,DR,YN
+9 QUIT
+10 SUPPNUM READ !!,"Select Support Number to Delete: ",DNUM
+1 +2 ;CHECK FOR "^" TO QUIT OR "?" FOR HELP
+3 IF (DNUM="^")!(DNUM="")
QUIT
+4 IF DNUM="?"
WRITE !!,"Please enter the support number you would like to delete."
GOTO SUPPNUM
+5 +6 ;CHECK TO SEE IF INPUT IS GREATER THAN CURRENT ENTRY NUMBER
+7 IF DNUM>INUM
WRITE !!,"Support Number, ",DNUM,", Does Not Exist!"
HANG 3
GOTO MAIN
+8 ;SKIP LINE
WRITE !
+9 ;CHECK TO SEE IF SUPPORT NUMBER HAS ALREADY BEEN DELETED
+10 SET PIEC=0
+11 IF '$ORDER(^DIZ(DIE,"B",DNUM,PIEC))
WRITE !!,"Support Number, ",DNUM,", Has already been deleted!"
HANG 3
GOTO MAIN
+12 +13 ;SET INTERNAL NUMBER TO USER INPUT
SET DA=DNUM
+14 ;SET SUBSCRIPTS TO BE VIEWED
SET DR=".01:7"
+15 +16 LOCK ^DIZ(DIE,DA):0
IF '$TEST
WRITE !!,"Record has been locked, try again later!"
HANG 3
GOTO MAIN
+17 ;DO DATA DISPLAY OF GIVEN SUPPORT NUMBER
DO EN^DIQ
+18 +19 WRITE !!,"Do you want to continue to delete Support Number, ",DNUM,"? N//"
+20 READ YN
+21 +22 ;IF "N" UNLOCK RECORD AND GOTO MAIN
IF YN'="Y"
LOCK
GOTO MAIN
+23 +24 READ !,"Are you sure? N//",YN
+25 ;IF "N" UNLOCK RECORD AND GOTO MAIN
IF YN'="Y"
LOCK
GOTO MAIN
+26 +27 WRITE !!,"Deleting Support Number, ",DA,", one moment please..."
HANG 1
+28 ;SET TO DELETE SUPPORT NUMBER (.01 FIELD)
SET DR=".01///@"
+29 ;CALL EDIT IN FILEMAN FOR DELETE
DO ^DIE
+30 ;UNLOCK RECORD
LOCK
+31 ;RUN DELETE PROGRAM AGAIN
GOTO MAIN
+32 QUIT