source: FOIAVistA/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DINVMSM.m@ 711

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

initial load of FOIAVistA 6/30/08 version

File size: 5.3 KB
Line 
1%ZOSV ;SFISC/AC - $View commands for MSM-PC/PLUS ;2:24 PM 1 Oct 1998
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5ACTJ() ;
6 Q $S($$V3:$V($V(44)+168,-3,2),1:$V(168,-4,2))
7AVJ() ;
8 Q $S($$V3:$V($V(44)+94,-3,2)+1-$V($V(44)+168,-3,2),1:$V($V(3,-5),-3,0)-$V(168,-4,2))
9T0 ; start RT clock
10 I $$OSTYPE()'=1 S XRT0=$H Q
11 S XRT0=$P($H,",")_","_($V(#46C,-3,4)*5.4925\1/100) Q
12T1 ; store RT datum
13 I $$OSTYPE()'=1 S ^%ZRTL(3,XRTL,+$H,$P($H,",",2))=XRT0 K XRT0 Q
14 S ^%ZRTL(3,XRTL,+$H,XRTN,$V(#46C,-3,4)*5.4925\1/100)=XRT0 K XRT0 Q
15JOBPAR ;
16 S Y=$V(2,X,2) Q:'Y
17 S Y=$ZU(Y#32,Y\32) Q
18PROGMODE() ;
19 Q $V(0,$J,2)#2
20PRGMODE ;
21 W ! S ZTPAC=$S('$D(^VA(200,+DUZ,.1)):"",1:$P(^(.1),U,5)),XUVOL=^%ZOSF("VOL")
22 I ZTPAC]"" X ^%ZOSF("EOFF") R !,"PAC: ",X:60 X ^%ZOSF("EON") I X'=ZTPAC W "??",*7 Q
23 K XMB,XMTEXT,XMY S XMB="XUPROGMODE",XMB(1)=DUZ,XMB(2)=$I D ^XMB:$L($T(^XMB)) D BYE^XUSCLEAN K ZTPAC,X,XMB
24 X ^%ZOSF("UCI") S XUCI=Y,XQZ="PRGM^ZUA[MGR]",XUSLNT=1 D DO^%XUCI
25 V 0:$J:$ZB($V(0,$J,2),1,7):2 S $ZE="PRGMODEX^%ZOSV" ABORT
26PRGMODEX W !,"YOU ARE NOW IN PROGRAMMING MODE!",! S $ECODE=",<<PROG>>,"
27 Q
28 ;
29SIGNOFF ;
30 I 0
31 ;I $V($V(44)+4,-3,2)\32768#2 Q
32 Q
33UCI ;
34 S Y=$ZU(0) Q ;X ^%ZOSF("UCI") Q
35 ;
36UCICHECK(X) ;
37 N Y,I S Y="",$ZT="BADUCI^%ZOSV"
38 I X["," S Y=$ZU($P(X,","),$P(X,",",2)),(X,Y)=$ZU($P(Y,","),$P(Y,",",2)) Q:Y]"" Y
39 F I=1:1:64 G:$ZU(I)="" BADUCI Q:$ZU(I)=X!($P($ZU(I),",")=X)!(I=X)
40 Q $ZU(I)
41 ;
42BADUCI Q ""
43 ;
44BAUD ;S Y=^%ZOSF("MGR"),X=$S($D(^%ZIS(1,D0,0)):$P(^(0),"^",2),1:"")
45 ;Q:X="" I '$D(^[Y]SYS(0,"DDB",+X)) S X="" Q
46 ;S X=$P(^(+X),",",3)#100 Q:'X
47 ;S X=$P("50,75,110,134.5,150,300,600,1200,1800,2400,3600,4800,9600",",",X) Q
48 Q
49 ;
50LGR() Q $ZR ;Last global ref.
51 ;
52EC() Q $ZE ;Error code
53 ;
54DOLRO ;SAVE ENTIRE SYMBOL TABLE IN LOCATION SPECIFIED BY X
55 S Y="%" F %=0:0 S Y=$O(@Y) Q:Y="" S %=$D(@Y) S:%#2 @(X_"Y)="_Y) I %>9 S %X=Y_"(",%Y=X_"Y," D %XY^%RCR
56 Q
57 ;
58ORDER ;SAVE PART OF SYMBOL TABLE IN LOCATION SPECIFIED BY X
59 S (Y,Y1)=$P(Y,"*",1) I $D(@Y)=0 F %=0:0 S Y=$O(@Y) Q:Y=""!(Y[Y1)
60 Q:Y="" S %=$D(@Y) S:%#2 @(X_"Y)="_Y) I %>9 S %X=Y_"(",%Y=X_"Y," D %XY^%RCR
61 F %=0:0 S Y=$O(@Y) Q:Y=""!(Y'[Y1) S %=$D(@Y) S:%#2 @(X_"Y)="_Y) I %>9 S %X=Y_"(",%Y=X_"Y," D %XY^%RCR
62 K %,X,Y,Y1 Q
63 ;
64PRIORITY ;
65 Q:X>5 N %D,%P S %P=(X>5) D INT^%HL Q
66 ;
67PRIINQ() ;
68 Q $S($V(20,$J,2):10,1:1)
69PARSIZ ;
70 S X=3 Q
71 ;
72NOLOG ;
73 S Y=$S($$V3:"$V($V(44)+4,-3,2)",1:"$V(4,-4,2)")_"\64#2" Q
74 ;
75DEVOPN ;
76 ;X=$J,Y=List of devices separated by a comma
77 N %,%1,%I,%X
78 S Y=""
79 I $$V3 S %=$V($V(44)+10,-3,2),%1=$V($V(44)+8,-3,2)+$V(44),%=$V(%*5+%1)
80 E S %=$V(5,-5,0)
81 F %I=1:1:255 S %X=$V(%+%I+%I,-3,2) I %X,%X#4=0,%X/4=X S Y=Y_%I_","
82 Q
83DEVOK ;
84 ;X=Device $I, Y=0 if available, Y=Job # if owned,
85 ;Y=-1 if device is undefined.
86 G RES:$G(X1)="RES" I $E(X)="/"!($E(X)="\") S Y=0 Q
87 I X=2 S Y=0 Q
88 I X'?1.N!(X'>0!(X'<1024)) S Y=-1 Q
89 N %
90 I $$VERSION(1)["NT" D DVOPN Q
91 ;
92 I $$V3 S %=$V($V(44)+8,-3,2)+$V(44),%=$V($V($V(44)+10,-3,2)*5+%),Y=$V(%+X+X,-3,2),Y=$S(Y=0:0,Y#4=0:Y/4,1:-1)
93 E S %=$V(5,-5,0),Y=$V(%+X+X,-3,2),Y=$S(Y=0:0,Y#4=0:Y/4+$V(272,-4),1:-1)
94 I 'Y D DVOPN Q
95 S:Y=$J Y=0 Q
96DVOPN S $ZT="DVERR",Y=0 Q:$D(%ZTIO)
97 L:$D(%ZISLOCK) +@%ZISLOCK:60
98 O X::$S($D(%ZISTO):%ZISTO,1:0) E S Y=999 L:$D(%ZISLOCK) -@%ZISLOCK Q
99 L:$D(%ZISLOCK) -@%ZISLOCK
100 S Y=0 I '$D(%ZISCHK)!$S($D(%ZIS)#2:(%ZIS["T"),1:0) C X Q
101 S:X]"" IO(1,X)="" Q
102DVERR I $ZE["OPENERR" S Y=-1 L:$D(%ZISLOCK) -@%ZISLOCK Q
103 I $ZE["<NODEV>" S Y=-1 L:$D(%ZISLOCK) -@%ZISLOCK Q
104 ZQ
105RES S Y=0,%ZISD0=$O(^%ZISL(3.54,"B",X,0))
106 I '%ZISD0 S Y=-1,%ZISD0=%O(^%ZIS(1,"C",X)) Q:'%ZISD0 Q:'$D(^%ZIS(1,+%ZISD0,0)) Q:$P(^(0),"^")'=X Q:'$D(^("TYPE")) Q:^("TYPE")'="RES" S Y=0 Q
107 S X1=$S($D(^%ZISL(3.54,+%ZISD0,0)):^(0),1:"")
108 I $P(X1,"^",2)&(X=$P(X1,"^")) S Y=0 Q
109 S Y=999 F %ZISD1=0:0 S %ZISD1=$O(^%ZISL(3.54,%ZISD0,1,%ZISD1)) Q:%ZISD1'>0 I $D(^(%ZISD1,0)) S Y=$P(^(0),"^",3) Q
110 K %ZISD0,%ZISD1
111 Q
112V2CL1 F %=0:0 Q:$ZA<0 R %X:5 Q:%X']"" F %1=0:0 S %1=$L(%Y),%Y=%Y_$E(%X,1,255-%1),%X=$E(%X,256-%1,$L(%X)),%1=$F(%Y,%ZCR) Q:%1'>0 S %2=$E(%Y,$A(%Y)=10+1,%1-2),%Y=$E(%Y,%1,$L(%Y)) D V2CL2
113 I %Y]"" S %2=$E(%Y,$A(%Y)=10+1,$L(%Y)) D V2CL2
114 C 2:256 K IO(1,2) D CLOSE^ZISPL1 K %Y,%X,%1,ZOSFV
115 Q
116V2CL2 S %1=$F(%2,$C(12)) I %1>0 S %=%+1 D LIMIT:%Z1<% Q:%Z1<% S ^XMBS(3.519,XS,2,%,0)="|TOP|",%2=$E(%2,1,%1-2)_$E(%2,%1,$L(%2))
117 S %=%+1,^XMBS(3.519,XS,2,%,0)=%2 Q
118 ;
119LIMIT S ^XMBS(3.519,XS,2,%,0)="*** INCOMPLETE REPORT -- SPOOL DOCUMENT LINE LIMIT EXCEEDED ***",$P(^XMB(3.51,%ZDA,0),"^",11)=1 Q
120 ;
121SET ;SET SPECIAL VARIABLES
122 S DT=$$HTFM^DILIBF($H,1)
123 Q
124GETENV ;Get enviroment (UCI^VOL^NODE)
125 S Y=$P($ZU(0),",",1)_"^"_$P($ZU(0),",",2)_"^^"_$P($ZU(0),",",2)
126 Q
127VERSION(X) ;return OS version, X=1 - return OS
128 Q $S($G(X):$P($ZV,"Version "),1:$P($ZV,"Version ",2))
129V3() ;returns 1=version 3, 0=version 4
130 Q $P($ZV,"Version ",2)<4
131OSTYPE() ;Return 1 = PC/PLUS, 2 = NT, 3 = UNIX
132 N % S %=$$VERSION(1)
133 Q $S(%["MSM-PC/PLUS":1,%["Windows NT":2,1:3)
134 ;
135SETNM(X) ;Set name, Fall into SETENV
136SETENV ;Set enviroment
137 Q
138ZHDIF ;Display dif of two $$ZH^%MSMOPS's
139 S U="^" W !?2,"CPU=",$J($P(%ZH1,U)-$P(%ZH0,U),6,2),?14,"ET=",$J($P(%ZH1,U,7)-$P(%ZH0,U,7),6,2),?25,"PRD=",$J($P(%ZH1,U,3)-$P(%ZH0,U,3),4),?35,"LRD=",$J($P(%ZH1,U,2)-$P(%ZH0,U,2),6),?47,"LWT=",$J($P(%ZH1,U,4)-$P(%ZH0,U,4),5)
140 W ?58,"TI=",$J($P(%ZH1,U,5)-$P(%ZH0,U,5),4),?67,"TO=",$J($P(%ZH1,U,6)-$P(%ZH0,U,6),5)
141 Q
142LOGRSRC(OPT) ;record resource usage in ^XUCP
143 Q:$$OSTYPE'=1
144 D RO^%ZOSVKR(OPT)
145 Q
146SETTRM(X) ;Set specified terminators.
147 U $I:(::::::::X)
148 Q 1
Note: See TracBrowser for help on using the repository browser.