source: FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZUA.m@ 1071

Last change on this file since 1071 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1ZUA ;SF/LJP - AUDIT ACCESS ;11/17/94 15:07
2 ;;8.0;KERNEL;;Jul 10, 1995
3FAA ;Return failed access attempts
4 K X S X(0)=0 F I=1:1 S X(I)=$O(^%ZUA(3.05,"U",XUF,X(I-1))) Q:X(I)'>0 S %H=$P($H,",",2),$P(^%ZUA(3.05,X(I),0),U,7)=DT_(%H\60#60/100+(%H\3600)+(%H#60/10000)/100)
5 Q
6FAAL ;Record failed access attempts
7 S Z1=XUNOW
8F1 L +^%ZUA(3.05,0) I $D(^%ZUA(3.05,Z1,0)) S Z1=Z1+.000001 G F1
9 S $P(^(0),"^",3,4)=Z1_"^"_($P(^%ZUA(3.05,0),"^",4)+1)
10 S ^%ZUA(3.05,Z1,0)=IOS_U_$P(XUVOL,U,1)_U_XUF(.1)_U_XUT_U_$P(XUCI,",",1)_U_XUF(.3)_U_$S($D(IO("ZIO")):IO("ZIO"),1:"") L -^%ZUA(3.05,0)
11 I XUF=2 F I=1:1:XUF(.2) S ^%ZUA(3.05,Z1,1,I,0)=XUF(I)
12 ;I XUF(.3) S ^%ZUA(3.05,"U",$P(XUVOL,U,1)_","_$P(XUCI,",",1)_","_XUF(.3),Z1)=""
13 K Z1 Q
14PRGM ;Programmer mode log.
15 S %H=$P($H,",",2),Z1=DT_(%H\60#60/100+(%H\3600)+(%H#60/10000)/100)
16P1 L +^%ZUA(3.07,0) I $D(^%ZUA(3.07,Z1,0)) S Z1=Z1+.000001 G P1
17 S $P(^(0),"^",3,4)=Z1_"^"_($P(^%ZUA(3.07,0),"^",4)+1)
18 S ^%ZUA(3.07,Z1,0)=DUZ_U_$P(XUCI,",",1)_U_$P(XUVOL,U,1) L -^%ZUA(3.07,0)
19 K Z1 Q
20PURG ;Purge both failed access and programmer mode logs to 30 days.
21 S X="T-30",%DT="" D ^%DT Q:Y'>0 S BD=2000000,ED=Y
22 F ZUI=3.05,3.07 S BDATE=BD,EDATE=ED D PRG
23 K BD,ED
24EXIT S:$D(ZTSK) ZTREQ="@" K BDATE,EDATE,REC Q
25PMPURG ;Purge programmer mode log.
26 S ZUI=3.07 D PRG G EXIT
27PURGE ;Purge failed access log.
28 S ZUI=3.05 D PRG G EXIT
29PRG S C=0 F REC=BDATE-.000001:0 S REC=$O(^%ZUA(ZUI,REC)) Q:REC'>0!(REC>EDATE) K ^(REC) S C=C+1
30 L +^%ZUA(ZUI,0) S $P(^(0),"^",4)=$P(^%ZUA(ZUI,0),"^",4)-C L -^%ZUA(ZUI,0) Q
31 ;
Note: See TracBrowser for help on using the repository browser.