[613] | 1 | RGUTIN8 ;CAIRO/DKM - Inits for MSM;04-Sep-1998 11:26;DKM
|
---|
| 2 | ;;2.1;RUN TIME LIBRARY;;Mar 22, 1999
|
---|
| 3 | OPEN(X1,X2) ;
|
---|
| 4 | N Z
|
---|
| 5 | S X2=$G(X2,"R")
|
---|
| 6 | F Z=51:1:55 I '$D(^TMP("HFS",$J,Z)) D Q
|
---|
| 7 | .ZT:Z=55 "TMOF"
|
---|
| 8 | .O Z:(X1:$S("RrWw"[X2:X2,1:"R")::::$S("Bb"[X2:"",1:$C(13,10)))
|
---|
| 9 | .U Z
|
---|
| 10 | .ZT:$ZA "OPEN"
|
---|
| 11 | .S ^TMP("HFS",$J,Z)=X1,X1=Z
|
---|
| 12 | Q
|
---|
| 13 | CLOSE(X) N Z
|
---|
| 14 | S Z=X,X=$G(^TMP("HFS",$J,X))
|
---|
| 15 | K ^(Z)
|
---|
| 16 | C Z
|
---|
| 17 | Q
|
---|
| 18 | CLOSEALL N Z
|
---|
| 19 | F Z=0:0 S Z=$O(^TMP("HFS",$J,Z)) Q:'Z C Z
|
---|
| 20 | K ^TMP("HFS",$J)
|
---|
| 21 | Q
|
---|
| 22 | EOF ZT:$ZC "EOF"
|
---|
| 23 | Q
|
---|
| 24 | EOFERR() Q $ZE["ZEOF"
|
---|
| 25 | READ(X,Y) ;
|
---|
| 26 | U:$G(Y)'="" Y
|
---|
| 27 | R X
|
---|
| 28 | Q $ZC&'$L(X)
|
---|
| 29 | DELETE(X) ;
|
---|
| 30 | S X=$ZOS(2,X)
|
---|
| 31 | Q
|
---|
| 32 | RENAME(X1,X2) ;
|
---|
| 33 | N Z
|
---|
| 34 | S Z=$ZOS(3,X1,X2)
|
---|
| 35 | Q
|
---|
| 36 | DIR(X1,X2,X3) ;
|
---|
| 37 | N Z
|
---|
| 38 | S X1=$ZOS(12,X1,0),X2=+$G(X2),X3=$G(X3,"^UTILITY(""DIR"",$J)")
|
---|
| 39 | K @X3
|
---|
| 40 | F Z=1:1 Q:(X2&(Z>X2))!($P(X1,"^")="") S @X3@($P(X1,"^"))="",X1=$ZOS(13,X1)
|
---|
| 41 | Q
|
---|
| 42 | DEFDIR(X) ;
|
---|
| 43 | S X=$G(X,$P($G(^XTV(8989.3,1,"DEV")),U))
|
---|
| 44 | S:$E(X,$L(X))'="\" X=X_"\"
|
---|
| 45 | Q X
|
---|
| 46 | DIRDLM() Q "\\\"
|
---|
| 47 | FREE(X) S X=$ZOS(9,$E(X))
|
---|
| 48 | Q X*$P(X,"^",2)*$P(X,"^",3)/1048576
|
---|
| 49 | ERR(X1,X2,X3) ;
|
---|
| 50 | S X1=$E($P($ZE,">"),2,99),X2=$P($P($ZE,">",2),":"),X3=X1
|
---|
| 51 | S:X2["*" X2=""
|
---|
| 52 | S:$E(X1)="Z" X3=$E(X1,2,99),X1="ZTRAP"
|
---|
| 53 | Q
|
---|
| 54 | FTP(X1,X2,X3,X4,X5,X6,X7) ;
|
---|
| 55 | Q
|
---|
| 56 | RAISE(X) ZT $G(X)
|
---|
| 57 | TRAP(X) Q $S($D(X):"$ZT="""_X_"""",1:"$ZT")
|
---|
| 58 | SIZE(X) N I,Y,Z
|
---|
| 59 | S Z=$ZOS(12,X,0),Z=$P(Z,"^",2,999),Y=0
|
---|
| 60 | I Z'="" F I=30:-1:27 S Y=Y*256+$A(Z,I)
|
---|
| 61 | Q Y
|
---|