source: WorldVistAEHR/trunk/r/ZZREGIONAL-A1C-A5C-CRHD-RGED-RGUT-RGWB-RG/RGUTOS.m@ 862

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

initial load of WorldVistAEHR

File size: 1.7 KB
RevLine 
[613]1RGUTOS ;CAIRO/DKM - Platform-dependent operations;04-Sep-1998 11:26;DKM
2 ;;2.1;RUN TIME LIBRARY;;Mar 22, 1999
3 ;=================================================================
4VER() Q $P($T(+2),";",3)
5CVTFN(RGFIL,RGROOT) ;
6 N RGZ,RGZ1,RGD
7 S RGD=$$DIRDLM,RGROOT=$G(RGROOT)
8 S:$E(RGROOT,$L(RGROOT))=$E(RGD,3) RGROOT=$E(RGROOT,1,$L(RGROOT)-1)
9 S RGZ=$L(RGFIL,"/"),RGZ1=$P(RGFIL,"/",1,RGZ-1),RGFIL=$P(RGFIL,"/",RGZ)
10 S:$L(RGZ1) RGROOT=RGROOT_$E(RGD,$S($L(RGROOT):2,1:1))_$TR(RGZ1,"/.-",$E(RGD,2))
11 Q RGROOT_$S($L(RGROOT):$E(RGD,3),1:"")_RGFIL
12RM(X) X ^%ZOSF("RM")
13 Q
14TEST(X) N Z
15 S:X[U Z=$P(X,U),X=$P(X,U,2)
16 X ^%ZOSF("TEST")
17 Q $S('$T:0,$G(Z)="":1,Z'?.1"%"1.AN:0,1:$T(@Z^@X)'="")
18ETRAP() Q $$NEWERR^%ZTER
19OPENX(X1,X2) ;
20 D OPEN(.X1,.X2)
21 Q X1
22OPEN(X1,X2) ;
23 O X1:$S("Rr"[$G(X2):"RS","Ww"[X2:"WNS","Bb"[X2:"RF",1:""):0
24 E ZT "NOPEN"
25 U X1
26 S ^TMP("HFS",$J,X1)=""
27 Q
28CLOSE(X) C X
29 K ^TMP("HFS",$J,X)
30 Q
31CLOSEALL N Z
32 S Z=""
33 F S Z=$O(^TMP("HFS",$J,Z)) Q:Z="" C Z
34 K ^TMP("HFS",$J)
35 Q
36EOF ZT:$ZA=-1 "ENDOFFILE"
37 Q
38EOFERR() Q:$ZE["ENDOFFILE"
39READ(X,Y) ;
40 S $ZT="READX"
41 U $G(Y,$I)
42 R X
43 Q 0
44READX Q 1
45DELETE(X) ;
46 S X=$ZF(-1,"del """_X_"""")
47 Q
48RENAME(X1,X2) ;
49 S X1=$ZF(-1,"ren """_X1_""" """_X2_"""")
50 Q
51DIR(X1,X2,X3) ;
52 N Z,Z1
53 S X3=$G(X3,$NA(^UTILITY("DIR",$J)))
54 K @X3
55 S:'$G(X2) X2=9999999999
56 F Z=1:1:X2 S Z1=$ZSEARCH(X1),X1="" Q:Z1="" D
57 .S Z1=$P(Z1,"\",$L(Z1,"\"))
58 .S:$TR(Z1,".")'="" @X3@(Z1)=""
59 Q
60DIRDLM() Q "\\\"
61DEFDIR(X) ;
62 S X=$G(X,$P($G(^XTV(8989.3,1,"DEV")),U))
63 S:$E(X,$L(X))'="\" X=X_"\"
64 Q X
65ERR(X1,X2,X3) ;
66 S X1=$E($P($ZE,">"),2,99),X2=$P($P($ZE,">",2),":"),X3=X1
67 S:X2["*" X2=""
68 S:$E(X1)="Z" X3=$E(X1,2,99),X1="ZTRAP"
69 Q
70FTP(X1,X2,X3,X4,X5,X6,X7) ;
71 Q
72RAISE(X) ZT $G(X)
73TRAP(X) Q $S($D(X):"$ZT="""_X_"""",1:"$ZT")
74SIZE(X) Q 0
75FREE(X) Q 0
Note: See TracBrowser for help on using the repository browser.