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

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

initial load of FOIAVistA 6/30/08 version

File size: 669 bytes
Line 
1%ZTMS5 ;ISF/RWF - SubManager Utilities ;10/29/2003 ;11/03/2003 13:45
2 ;;8.0;KERNEL;**275**;Jul 10, 1995;
3 Q
4 ;Lock and time are set in EXIT^%ZTMS1.
5SUBCHK ;Check for lost submanagers, Update Count
6 N %C,%N,%J,ZT2,ZT3
7 S %N=""
8 F S %N=$O(^%ZTSCH("SUB",%N)) Q:%N="" D
9 . L +^%ZTSCH("SUB",%N):5
10 . S %C=0,%J=0,ZT3=$$H3^%ZTM($H)
11 . F S %J=$O(^%ZTSCH("SUB",%N,%J)) Q:%J'>0 D
12 . . S ZT2=$$H3^%ZTM($G(^(%J)))
13 . . ;Check for not locked.
14 . . L +^%ZTSCH("SUBLK",%N,%J):0 I $T L -^%ZTSCH("SUBLK",%N,%J) K ^%ZTSCH("SUB",%N,%J) Q
15 . . ;Check for old
16 . . I (ZT2+30)<ZT3 K ^%ZTSCH("SUB",%N,%J) Q
17 . . S %C=%C+1
18 . . Q
19 . S ^%ZTSCH("SUB",%N)=%C
20 . L -^%ZTSCH("SUB",%N)
21 . Q
22 Q
Note: See TracBrowser for help on using the repository browser.