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/ZIS31.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 1.1 KB
Line 
1%ZIS31 ;SFISC/AC - DEVICE HANDLER -- RESOURCES ;10/13/89 13:51
2 ;
3 L ^%ZISL(3.54):1
4 I '$T S POP=1 W:'$D(IOP) *7," [NOT AVAILABLE]" Q
5 S X=$O(^%ZISL(3.54,"B",IO,0))
6 I 'X D FLST S ^%ZISL(3.54,"B",IO,L)="",X=L
7 I '($D(^%ZISL(3.54,+X,0))#2) S ^(0)=IO_"^"_%ZISRL,A=^%ZISL(3.54,0),$P(A,"^",3)=+X,$P(A,"^",4)=$P(A,"^",4)+1,^(0)=A,IO(1,IO)="RES",%ZISD0=+X G R1
8 S %ZISD0=+X
9 S X=$P(^(0),"^",2) I 'X S POP=1 W:'$D(IOP) *7," [NOT AVAILABLE]" L Q
10 S X=X-1,$P(^(0),"^",2)=X,IO(1,IO)="RES"
11 ;
12R1 ;
13 ;S %ZISROOT="^%ZISL(3.54,"_%ZISD0_",1," S:'$D(^%ZISL(3.54,%ZISD0,1,0)) ^(0)="^3.542^^" D FLST S ^%ZISL(3.54,%ZISD0,1,"B",L,L)="",X=L
14 S:'$D(^%ZISL(3.54,%ZISD0,1,0)) ^(0)="^3.542^^"
15 ;D FLST
16 F L=1:1:(%ZISRL+1) I '$D(^%ZISL(3.54,%ZISD0,1,L,0)) Q
17 I '$T,L=(%ZISRL+1) S POP=1 K IO(1,IO) Q
18 S ^%ZISL(3.54,%ZISD0,1,"B",L,L)="",X=L
19 S ^%ZISL(3.54,%ZISD0,1,+X,0)=+X_"^"_%ZISV_"^"_$J,A=^%ZISL(3.54,%ZISD0,1,0),$P(A,"^",3)=+X,$P(A,"^",4)=$P(A,"^",4)+1,^(0)=A
20 L Q
21 ;
22FLST S:'$D(^%ZISL(3.54,0)) ^(0)="RESOURCE^3.54^^" S X=$P(^(0),"^",3),A=X
23 F I=+X:0 S I=+$O(^%ZISL(3.54,I)) Q:I'>0 S A=I
24 S L=A+1 Q
25NTRMS ;
Note: See TracBrowser for help on using the repository browser.