AUSIGNON ; IHS/ACC - KERNEL SIGNON AUDIT [ 09/08/85 5:53 PM ]
F Q=0:0 R "DATE FOR WHICH TO DISPLAY SIGNONS: ",D,! Q:D="" D SHODATE
K D
Q
;
SHODATE ;
S T=D F Q=0:0 S T=$O(^XUSEC(0,T)) Q:T="" Q:(T\1)>D D SHOSESS
Q
;
SHOSESS ;
S SDESC=^XUSEC(0,T,0),WHONUM=$P(SDESC,"^",1),ON=$E($P(T,".",2),1,4),TERM=$P(SDESC,"^",2)
S WHONAME=$P(^DIC(3,WHONUM,0),"^",1)
S ENDSESS=$P(SDESC,"^",4),OFF=$E($P(ENDSESS,".",2),1,4)
S:$F(WHONAME,",") WHONAME=$P(WHONAME,",",2)_" "_$P(WHONAME,",",1)
W ON," ",WHONAME," on device ",TERM," ",$S(OFF="":"(escaped from kernel)",1:"logged off at "_OFF),!
Q
AUSIGNON ; IHS/ACC - KERNEL SIGNON AUDIT [ 09/08/85 5:53 PM ]
+1 FOR Q=0:0
READ "DATE FOR WHICH TO DISPLAY SIGNONS: ",D,!
IF D=""
QUIT
DO SHODATE
+2 KILL D
+3 QUIT
+4 ;
SHODATE ;
+1 SET T=D
FOR Q=0:0
SET T=$ORDER(^XUSEC(0,T))
IF T=""
QUIT
IF (T\1)>D
QUIT
DO SHOSESS
+2 QUIT
+3 ;
SHOSESS ;
+1 SET SDESC=^XUSEC(0,T,0)
SET WHONUM=$PIECE(SDESC,"^",1)
SET ON=$EXTRACT($PIECE(T,".",2),1,4)
SET TERM=$PIECE(SDESC,"^",2)
+2 SET WHONAME=$PIECE(^DIC(3,WHONUM,0),"^",1)
+3 SET ENDSESS=$PIECE(SDESC,"^",4)
SET OFF=$EXTRACT($PIECE(ENDSESS,".",2),1,4)
+4 IF $FIND(WHONAME,",")
SET WHONAME=$PIECE(WHONAME,",",2)_" "_$PIECE(WHONAME,",",1)
+5 WRITE ON," ",WHONAME," on device ",TERM," ",$SELECT(OFF="":"(escaped from kernel)",1:"logged off at "_OFF),!
+6 QUIT