Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: FSCRPXU

FSCRPXU.m

Go to the documentation of this file.
FSCRPXU ;SLC/STAFF-NOIS RPC Process Utility ;8/8/98  00:39
 ;;1.1;NOIS;;Sep 06, 1998
 ;
USERS ; display users
 N USER,VERSION,CNT,NCNT
 S CNT=0,NCNT=0
 S USER=0 F  S USER=$O(^XTMP("FSCRPC","<VERSION>",USER)) Q:USER<1  S VERSION=^(USER) D
 .W !,USER,?10,VERSION,?20 W:$$ACCESS^FSCU(USER,"SPEC") "*  " W $P($G(^VA(200,USER,0)),U)
 .S CNT=CNT+1 I '$L(VERSION) S NCNT=NCNT+1
 W !,CNT,"  ",NCNT
 Q
 ;
TODAY ; display todays users
 N TIME,USER
 S TIME="" F  S TIME=$O(^XTMP("FSCRPC","<STARTUP>",TIME)) Q:TIME=""  D
 .I -TIME<DT Q  ;(DT-1) Q
 .S USER=0 F  S USER=$O(^XTMP("FSCRPC","<STARTUP>",TIME,USER)) Q:USER<1  D
 ..W !,$$FMTE^XLFDT(-TIME) W:$$ACCESS^FSCU(USER,"SPEC") ?25,"*",$E($P($G(^FSC("SPEC",USER,0)),U,4)) W ?30,$P($G(^VA(200,USER,0)),U)
 ..W ?50,$G(^XTMP("FSCRPC","<VERSION>",USER))
 ..W ?60,$P($G(^DIC(4,+$P($G(^VA(200,USER,120000)),U,2),0)),U)
 Q
 ;
DAYS ;
 N CNT,DAY,TIME,USER K ^TMP($J)
 S TIME="" F  S TIME=$O(^XTMP("FSCRPC","<STARTUP>",TIME)) Q:TIME=""  D
 .;I -TIME<DT Q
 .S DAY=-TIME\1
 .S USER=0 F  S USER=$O(^XTMP("FSCRPC","<STARTUP>",TIME,USER)) Q:USER<1  D
 ..S ^TMP($J,DAY,USER)=""
 S DAY=0 F  S DAY=$O(^TMP($J,DAY)) Q:DAY<1  D
 .W !,DAY
 .S CNT=0
 .S USER=0 F  S USER=$O(^TMP($J,DAY,USER)) Q:USER<1  S CNT=CNT+1
 .W ?20,CNT
 K ^TMP($J)
 Q
 ;
PROF ;
 N CNT,RTN,USER
 S DIC=200,DIC(0)="AEMOQZ",DIC("A")="User: "
 D ^DIC I Y<1 Q
 S USER=+Y
 S RTN="" F  S RTN=$O(^XTMP("FSCRPC","ZZUSER",USER,RTN)) Q:RTN=""  S CNT=+^(RTN) D
 .W !,RTN,?20,CNT
 Q
 ;
ROU ;
 N CNT,RTN,TCNT,USER K ^TMP("FSCTEST",$J)
 W !,"Enter routine: " R X:30 I $L(X)'>6 Q
 S RTN=X
 S USER=0 F  S USER=$O(^XTMP("FSCRPC","ZZUSER",USER)) Q:USER<1  D
 .S CNT=+$G(^XTMP("FSCRPC","ZZUSER",USER,RTN)) I 'CNT Q
 .S NAME=$P(^VA(200,+USER,0),U) I $$ACCESS^FSCU(+USER,"SPEC") S NAME="* "_NAME
 .S ^TMP("FSCTEST",$J,CNT,NAME,USER)=""
 S CNT=0 F  S CNT=$O(^TMP("FSCTEST",$J,CNT)) Q:CNT<1  D
 .S NAME="" F  S NAME=$O(^TMP("FSCTEST",$J,CNT,NAME)) Q:NAME=""  D
 ..S USER=0 F  S USER=$O(^TMP("FSCTEST",$J,CNT,NAME,USER)) Q:USER<1  D
 ...W !,CNT,?10,NAME
 K ^TMP("FSCTEST",$J)
 Q
 ;
RTN ;
 N CNT,RTN K ^TMP("FSCRPC",$J)
 S RTN="" F  S RTN=$O(^XTMP("FSCRPC",RTN)) Q:RTN=""  D
 .I RTN=0 Q
 .I RTN="<STARTUP>" Q
 .I RTN="<VERSION>" Q
 .I RTN="ZZUSER" Q
 .S CNT=+^XTMP("FSCRPC",RTN)
 .S ^TMP("FSCRPC",$J,CNT,RTN)=""
 S CNT="" F  S CNT=$O(^TMP("FSCRPC",$J,CNT)) Q:CNT=""  D
 .S RTN="" F  S RTN=$O(^TMP("FSCRPC",$J,CNT,RTN)) Q:RTN=""  D
 ..W !,CNT,?10,RTN
 K ^TMP("FSCRPC",$J)
 Q
EPTYPE ;
 K ^FSCD("CALL","AET")
 S CNT=0
 S CALL=0 F  S CALL=$O(^FSCD("CALL",CALL)) Q:CALL<1  S NODE=$G(^(CALL,120)) D
 .S EPTYPE=$P(NODE,U,21)
 .I 'EPTYPE W !,CALL Q
 .S CNT=CNT+1
 .I CNT#1000=0 W !,"*",CNT
 .I EPTYPE=1 S EPTYPE=3
 .S $P(^FSCD("CALL",CALL,120),U,21)=EPTYPE
 .S ^FSCD("CALL","AET",EPTYPE,CALL)=""
 Q
TEST ;
 S CALL=60000 F  S CALL=$O(^FSCD("STATUS HIST","B",CALL)) Q:CALL<1  D
 .S COUNT=0
 .S NUM=0 F  S NUM=$O(^FSCD("STATUS HIST","B",CALL,NUM)) Q:NUM<1  D
 ..S ZERO=$G(^FSCD("STATUS HIST",NUM,0)) I '$L(ZERO) Q
 ..I $P(ZERO,U,4)=1,$P(ZERO,U,5)="" S COUNT=COUNT+1
 .I COUNT>1 W !,CALL,"  ",COUNT,"  ",$P(^FSCD("CALL",CALL,0),U)
 Q