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

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

initial load of WorldVistAEHR

File size: 3.1 KB
Line 
1%ZOSV ;SFISC/AC - $View commands for M/SQL (ISM VAX) systems. ;12/15/95 08:53
2 ;;8.0;KERNEL;**13**;Jul 03, 1995
3ACTJ() ;
4 N Y,% S Y=$V(204,-2,4),%="" F Y=0:1:Y-1 S %=$ZJ(%) Q:%=""
5 Q Y
6AVJ() ;
7 Q 128-$$ACTJ()
8PRIINQ() ;
9 Q 8
10UCI ;
11 ;S Y=$V(4,-2,4)+348,Y=$V(Y+1,$J,-$V(Y,$J,1)) Q ;***
12 D ^%ST S Y=$V(%ST("DIR")+1,$J,-$V(%ST("DIR"),$J,1)) Q
13 ;
14UCICHECK(X) ;
15 N Y,%
16 S X=$P(X,",",1),Y=0,%=^%ZOSF("MGR"),%=$D(^[%]SYS("UCI",0)) F %=0:0 S Y=$O(^(Y)) Q:Y=""!(Y=X)
17 Q Y
18JOBPAR ;
19 K ZJ S ZJ="" F Y=0:0 S ZJ=$ZJ(ZJ) Q:'$L(ZJ) S ZJ(ZJ)=""
20 ;S Y="" Q:'$D(ZJ(X)) S Y=$V($V(4,-2,4)+349,X,-$V($V(4,-2,4)+348,X,1)) K ZJ Q
21 S Y="" Q:'$D(ZJ(X)) S Y=$P($V(-1,X),"^",5) K ZJ Q
22 ;
23T0 ; start RT clock
24 S XRT0=$H Q
25T1 ; store RT datum
26 S ^%ZRTL(3,XRTL,+$H,XRTN,$P($H,",",2))=XRT0 K XRT0 Q
27NOLOG ;
28 S Y="$V(0,-2,4)\4096#2" Q
29 ;
30PRGMODE ;
31 W ! S ZTPAC=$S('$D(^VA(200,+DUZ,.1)):"",1:$P(^(.1),U,5)),XUVOL=^%ZOSF("VOL")
32 S X="" X ^%ZOSF("EOFF") R:ZTPAC]"" !,"PAC: ",X:60 D LC^XUS X ^%ZOSF("EON") I X'=ZTPAC W "??",*7 Q
33 S XMB="XUPROGMODE",XMB(1)=DUZ,XMB(2)=$I D ^XMB:$L($T(^XMB)) D BYE^XUSCLEAN K ZTPAC,X,XMB
34 D UCI S XUCI=Y,XQZ="PRGM^ZUA[MGR]",XUSLNT=1 D DO^%XUCI D ^%BJ X "ZR B"
35 Q
36LGR() Q $ZR ;Last Global ref.
37 ;
38EC() Q $ZE ;Error code
39 ;
40DOLRO ;SAVE ENTIRE SYMBOL TABLE IN LOCATION SPECIFIED BY X
41 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
42 Q
43 ;
44ORDER ;SAVE PART OF SYMBOL TABLE IN LOCATION SPECIFIED BY X
45 S (Y,Y1)=$P(Y,"*",1) I $D(@Y)=0 F %=0:0 S Y=$O(@Y) Q:Y=""!(Y[Y1)
46 Q:Y="" S %=$D(@Y) S:%#2 @(X_"Y)="_Y) I %>9 S %X=Y_"(",%Y=X_"Y," D %XY^%RCR
47 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
48 K %,X,Y,Y1 Q
49 ;
50PARSIZ ;
51 S X=3 Q
52 ;
53DEVOPN ;List of Devices opened
54 ;Returns variable Y. Y=Devices owned separated by a comma
55 S X=$J
56 N % S Y=$P($V(-1,$J),"^",3) F %=1:1:$L(Y,",") S $P(Y,",",%)=$P($P(Y,",",%),"*",1)
57 Q
58DEVOK ;
59 I $G(X1)="RES" G RES
60 I X=2 S Y=0 Q
61 S $ZT="OPNERR"
62 O X::$S($D(%ZISTO):%ZISTO,1:0) E S Y=999 Q ;G NOPN
63 S Y=0 I '$D(%ZISCHK)!$S($D(%ZIS)#2:(%ZIS["T"),1:0) C X Q
64 S:X]"" IO(1,X)="" Q
65 Q
66NOPN ;
67 N ZJ S $ZT="NJ"
68 S ZJ="" F %=0:0 S ZJ=$ZJ(ZJ) Q:'ZJ D NOPN1 Q:'ZJ
69 Q
70NOPN1 S Y=$V(-1,ZJ) I $P(Y,"^",3)[X_","!($P(Y,"^",3)[X_"*,") S Y=ZJ,ZJ="" Q
71 Q
72NJ Q ;NOJOB ERROR
73OPNERR S Y=-1 Q
74 ;
75RES S Y=0,%ZISD0=$O(^%ZISL(3.54,"B",X,0))
76 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
77 S X1=$S($D(^%ZISL(3.54,+%ZISD0,0)):^(0),1:"")
78 I $P(X1,"^",2)&(X=$P(X1,"^")) S Y=0 Q
79 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
80 K %ZISD0,%ZISD1
81 Q
82GETENV ;Get environment (UCI^VOL^NODE)
83 X ^%ZOSF("UCI") S Y=Y_"^"_^%ZOSF("VOL")_"^^"_^%ZOSF("VOL")
84 Q
85VERSION(X) ;return OS version, X=1 - return OS
86 Q $S($G(X):$P($ZV," V"),1:$P($P($ZV," V",2)," "))
87 ;
88SETNM(X) ;Set name, Fall into SETENV
89SETENV ;Set environment
90 Q
91 ;
92HFSREW(IO,IOPAR) ;Rewind Host File.
93 S $ZT="HFSRWERR"
94 C IO O @(""""_IO_""""_$S(IOPAR]"":":"_IOPAR_":1",1:":1")) I '$T Q 0
95 Q 1
96HFSRWERR ;Error encountered
97 Q 0
98LOGRSRC(OPT) ;record resource usage in ^XUCP
99 Q
Note: See TracBrowser for help on using the repository browser.