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/ZTBKCVXD.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1%ZTBKC1 ;SFISC/GJL,AC - VAX DSM BLOCK COUNT ;6/14/90 15:51
2 ;;8.0;KERNEL;;JUL 10, 1995
3 S %D=$P($ZU(""),",",2),%O=+$ZU(""),%O=%O-1*20,%D="S"_%D
4 S A=$ZC(%VIEWBUFFER,1) V 0:%D S %UT=$V(910,0,3)
5 V %UT:%D
6 S %B=$V(%O+2,0,3)
7VXDGD V %B:%D S %G="",%E=$V(1022,0,2),%O=0
8 F %I=0:1 Q:%E'>%O S %Z=$V(%O,0,1),%G=%G_$C(%Z\2),%O=%O+1 I '(%Z#2) Q:%G=$P(X,"(",1) S %G="",%O=%O+8
9 I %G'="" S %T=0,%O=%O+5 D VXDPTDW S %B=%L,%N="" G VXDPTBK
10 S %B=$V(1014,0,3) I %B G VXDGD
11 G EXIT
12VXDPTBK V %B:%D S (%H,%J,%L,%O)=0,%E=$V(1022,0,2) I ($V(1021,0,1)#128)=8 G VXDDATA
13VXDPTLP I %O<%E G VXDPTNT
14 S %B=$V(1018,0,3) I %B=0 S %B=%L
15 I %B G VXDPTBK
16 G EXIT
17VXDPTNT D VXDNODE I %I=2 D VXDPTDW S %O=%O+3 G VXDPTLP
18 I %I=1,%L=0 D VXDPTDW
19 S %B=%L G VXDPTBK
20VXDPTDW S %L=$V(%O,0,3) Q
21 ;
22VXDDTBK V %B:%D S %O=0,%E=$V(1022,0,2),%T=%T+1,%J=0
23 ;
24VXDDATA I %O<%E G VXDDTNT
25 S %B=$V(1018,0,3) I %B G VXDDTBK
26 G EXIT
27VXDDTNT S %J=%J+1 D VXDNODE I %I=1 S:%H=0 %T=%T+1 S %H=1,%O=%E G VXDDATA ;Next BLK
28 I %I=2 S %I=$V(%O,0,1),%O=%O+%I+1 G VXDDATA
29 S:%J=1 %T=%T-1 G EXIT
30VXDNODE S %C=$V(%O,0,1),%W=$V(%O+1,0,1),%O=%O+2
31 S %I=%O,%K="" I %C=0 S %K=%G,%I=%I+$L(%G)
32 ;
33 F %I=%I:1:%O+%W I %I<(%O+%W) S %Z=$V(%I,0,1),%K=%K_$C(%Z)
34 S %O=%I,%N=$E(%N,0,%C)_%K,%F=$E(%N,$L(%G)+1,256),%M="",%I=0
35VXDPROC S %I=%I+1 I %I>$L(%F) G VXDTSTN
36 S %M=%M_",",%V=$A(%F,%I),%I=%I+1 I %V=1 G VXDNULL
37 I %V<128 S %M=%M_"-" G VXDNEG
38VXDASCI S %M=%M_$E(%F,%I),%I=%I+1 I $A(%F,%I) G VXDASCI ;Also zero & pos
39 G VXDPROC
40VXDNULL S %M=%M_"",%I=%I+1 I $A(%F,%I) G VXDNULL
41 G VXDPROC
42VXDNEG I $E(%F,%I)="." S %M=%M_"."
43 E S %M=%M_$C(105-$A(%F,%I))
44 S %I=%I+1 I $A(%F,%I)=254 S %I=%I+1 G VXDPROC
45 G VXDNEG
46VXDTSTN S %M=$E(%M,2,256),%S=$P(X,"(",2),%S=$P(%S,")",1) I (%S="")!(%S=%M) S %I=1 Q
47VXDTSTL S %X=$P(%S,",",1),%Y=$P(%M,",",1) I +%X'=%X G VXDSTR
48 I %Y="" S %I=2 Q
49 I +%Y'=%Y S %I=3 Q
50 I %X>%Y S %I=2 Q
51 I %X<%Y S %I=3 Q
52VXDTSTC S %S=$P(%S,",",2,256) I %S="" S %I=1 Q
53 S %M=$P(%M,",",2,256) I %M="" S %I=2 Q
54 G VXDTSTL
55VXDSTR I +%Y=%Y S %I=2 Q
56 I %X]%Y S %I=2 Q
57 I %X'=%Y S %I=3 Q
58 G VXDTSTC
59ALL ;All globals from current directory.
60 K ^UTILITY("%ZTBKC",$J) X ^%ZOSF("UCI") W !!,Y," " S %SK=$X+1 W "Globals",?(%SK+12),"Data Blocks"
61 W ?(%SK+34) D NOW^%DTC S X=%,%DT="ET" D ^%DT W !
62 S %D=$P($ZU(""),",",2),%O=+$ZU(""),%O=%O-1*20,%D="S"_%D
63 S A=$ZC(%VIEWBUFFER,1) V 0:%D S %UT=$V(910,0,3)
64 V %UT:%D
65 S %B=$V(%O+2,0,3)
66AVXDVUE V %B:%D S %G="",%E=$V(1022,0,2),%O=0
67AVXDNXT G AVXDPTR:%E'>%O
68AVXDLOP S %Z=$V(%O,0,1),%O=%O+1,%G=%G_$C(%Z\2) G AVXDLOP:%Z#2
69 S ^UTILITY("%ZTBKC",$J,%G)="",%O=%O+8,%G="" G AVXDNXT
70AVXDPTR S %B=$V(1014,0,3) I %B G AVXDVUE
71 C 63 ;K %BLK,%END,%MM,%NAM,%PT,%S,%STB,%SYS,%UCI,%UCIN,%UCN,%UCNUM
72 S (%TOT,%GLO)=0 F %II=1:1 S X=$O(^UTILITY("%ZTBKC",$J,%GLO)),%GLO=X Q:X="" W !,?%SK,X,?(%SK+15) S:X?1"^".E X=$E(X,2,255) S %T=-1 D %ZTBKC1 S X=%T S:X>0 %TOT=%TOT+X W:X<0 "-- no such global --" W:X'<0 X
73 W !!?%SK,"Total",?(%SK+15),%TOT K %GLO,%II,%SK,%TOT,X,^UTILITY("%ZTBKC",$J)
74EXIT K %,%A,%B,%C,%D,%E,%F,%G,%H,%I,%J,%K,%L,%M,%N,%O,%S,%UT,%V,%W,%X,%Y,%Z,A
75 Q
Note: See TracBrowser for help on using the repository browser.