FSCLMPU ;SLC/STAFF-NOIS List Manager Protocol Utility ;12/8/97 13:40
;;1.1;NOIS;;Sep 06, 1998
;
SETUP(ACTION,USER) ; from FSCLMP
; give full scroll and refresh on return
D COUNTS(ACTION,USER)
D FULL^VALM1
S VALMBCK="R"
Q
;
COUNTS(ACTION,USER) ; from FSCOP, count actions
L +^XTMP("FSC COUNTS"):5 I '$T Q
S ^("TOTAL")=$G(^XTMP("FSC COUNTS","TOTAL"))+1
S ^(ACTION)=$G(^XTMP("FSC COUNTS","ACTION",ACTION))+1
S ^(ACTION)=$G(^XTMP("FSC COUNTS","USER ACTION",USER,ACTION))+1
L -^XTMP("FSC COUNTS")
Q
;
COUNT ;
N ACTION,COUNT,NUM,USER K ^TMP("FSC COUNT",$J)
S ^XTMP("FSC COUNTS",0)=$$FMADD^XLFDT(DT,7)_U_DT
W !,"TOTAL: ",$G(^XTMP("FSC COUNTS","TOTAL"))
W !,"ACTIONS:"
S ACTION="" F S ACTION=$O(^XTMP("FSC COUNTS","ACTION",ACTION)) Q:ACTION="" W !,ACTION,?15," ",+^(ACTION) S ^TMP("FSC COUNT",$J,"CA",+^(ACTION),ACTION)=""
W !,"ACTIONS BY COUNT:"
S COUNT="" F S COUNT=$O(^TMP("FSC COUNT",$J,"CA",COUNT),-1) Q:COUNT="" D
.S ACTION="" F S ACTION=$O(^TMP("FSC COUNT",$J,"CA",COUNT,ACTION)) Q:ACTION="" W !,COUNT,?6,ACTION
W !,"USER ACTIONS:"
S USER="" F S USER=$O(^XTMP("FSC COUNTS","USER ACTION",USER)) Q:USER="" D
.S ACTION="" F S ACTION=$O(^XTMP("FSC COUNTS","USER ACTION",USER,ACTION)) Q:ACTION="" S NUM=+^(ACTION) D
..W !,$$VALUE^FSCGET(USER,7100,2.1),?25," ",ACTION,?41," ",NUM
.
K ^TMP("FSC COUNT",$J)
Q
;
NOACCESS ; from FSCLMP, FSCOP
; msg when no access allowed
W !,"You don't have access to perform this function.",!,$C(7)
H 2
S VALMBCK=""
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCLMPU 1530 printed Oct 16, 2024@18:19:14 Page 2
FSCLMPU ;SLC/STAFF-NOIS List Manager Protocol Utility ;12/8/97 13:40
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
SETUP(ACTION,USER) ; from FSCLMP
+1 ; give full scroll and refresh on return
+2 DO COUNTS(ACTION,USER)
+3 DO FULL^VALM1
+4 SET VALMBCK="R"
+5 QUIT
+6 ;
COUNTS(ACTION,USER) ; from FSCOP, count actions
+1 LOCK +^XTMP("FSC COUNTS"):5
IF '$TEST
QUIT
+2 SET ^("TOTAL")=$GET(^XTMP("FSC COUNTS","TOTAL"))+1
+3 SET ^(ACTION)=$GET(^XTMP("FSC COUNTS","ACTION",ACTION))+1
+4 SET ^(ACTION)=$GET(^XTMP("FSC COUNTS","USER ACTION",USER,ACTION))+1
+5 LOCK -^XTMP("FSC COUNTS")
+6 QUIT
+7 ;
COUNT ;
+1 NEW ACTION,COUNT,NUM,USER
KILL ^TMP("FSC COUNT",$JOB)
+2 SET ^XTMP("FSC COUNTS",0)=$$FMADD^XLFDT(DT,7)_U_DT
+3 WRITE !,"TOTAL: ",$GET(^XTMP("FSC COUNTS","TOTAL"))
+4 WRITE !,"ACTIONS:"
+5 SET ACTION=""
FOR
SET ACTION=$ORDER(^XTMP("FSC COUNTS","ACTION",ACTION))
if ACTION=""
QUIT
WRITE !,ACTION,?15," ",+^(ACTION)
SET ^TMP("FSC COUNT",$JOB,"CA",+^(ACTION),ACTION)=""
+6 WRITE !,"ACTIONS BY COUNT:"
+7 SET COUNT=""
FOR
SET COUNT=$ORDER(^TMP("FSC COUNT",$JOB,"CA",COUNT),-1)
if COUNT=""
QUIT
Begin DoDot:1
+8 SET ACTION=""
FOR
SET ACTION=$ORDER(^TMP("FSC COUNT",$JOB,"CA",COUNT,ACTION))
if ACTION=""
QUIT
WRITE !,COUNT,?6,ACTION
End DoDot:1
+9 WRITE !,"USER ACTIONS:"
+10 SET USER=""
FOR
SET USER=$ORDER(^XTMP("FSC COUNTS","USER ACTION",USER))
if USER=""
QUIT
Begin DoDot:1
+11 SET ACTION=""
FOR
SET ACTION=$ORDER(^XTMP("FSC COUNTS","USER ACTION",USER,ACTION))
if ACTION=""
QUIT
SET NUM=+^(ACTION)
Begin DoDot:2
+12 WRITE !,$$VALUE^FSCGET(USER,7100,2.1),?25," ",ACTION,?41," ",NUM
End DoDot:2
+13 End DoDot:1
+14 KILL ^TMP("FSC COUNT",$JOB)
+15 QUIT
+16 ;
NOACCESS ; from FSCLMP, FSCOP
+1 ; msg when no access allowed
+2 WRITE !,"You don't have access to perform this function.",!,$CHAR(7)
+3 HANG 2
+4 SET VALMBCK=""
+5 QUIT