1 | XUPARAM ;SF/RWF - Lookup parameter substitute, KSP values ;03/26/2003 11:56
|
---|
2 | ;;8.0;KERNEL;**65,115,224**;Jul 10, 1995
|
---|
3 | Q
|
---|
4 | GET(%X,STYLE) ;Get substitute value
|
---|
5 | ;Style, N will return call name as default
|
---|
6 | ; V will return null as default
|
---|
7 | ;otherwize will return zero as default
|
---|
8 | N %1,%2,%Y S STYLE=$G(STYLE),%Y=$S(STYLE="N":%X,STYLE="V":"",1:0)
|
---|
9 | S %1=$$LKUP(%X) I %1'>0 Q %Y
|
---|
10 | S %2=$G(^XTV(8989.2,%1,0))
|
---|
11 | I $P(%2,"^",4)]"" Q $P(%2,"^",4)
|
---|
12 | I $P(%2,"^",3)]"" Q $P(%2,"^",3)
|
---|
13 | Q %Y
|
---|
14 | SET(%X,VALUE,DEF) ;Set parameter value, default
|
---|
15 | N %1
|
---|
16 | S %1=$$LKUP(%X,"A") Q:%1'>0
|
---|
17 | Q:'$D(VALUE)
|
---|
18 | S $P(^XTV(8989.2,%1,0),"^",4)=VALUE S:$G(DEF)]"" $P(^XTV(8989.2,%1,0),"^",3)=DEF
|
---|
19 | Q
|
---|
20 | LKUP(X,ACTION) ;
|
---|
21 | N E
|
---|
22 | S E=$O(^XTV(8989.2,"B",X,0)) I E>0 Q E
|
---|
23 | I $G(ACTION)'["A" Q -1
|
---|
24 | N DA,DIC,DLAYGO,Y
|
---|
25 | S DIC="^XTV(8989.2,",DIC(0)="ML",DLAYGO=8989.2 D FILE^DICN
|
---|
26 | Q +Y
|
---|
27 | ;
|
---|
28 | BAT() Q $P($G(^XTV(8989.3,1,"XWB"),180),U) ;Broker Activity timeout
|
---|
29 | ;
|
---|
30 | KSP(NAME) ;To return data from KSP file.
|
---|
31 | N NM S NM=$P($G(NAME)," ")
|
---|
32 | Q:'$L(NM) "" ;No parameter value
|
---|
33 | Q:$T(@NM)="" "" G @NM
|
---|
34 | SPOOL Q $P($G(^XTV(8989.3,1,"SPL")),"^",$S(NAME["LINE":1,NAME["DOC":2,NAME["LIFE":3,1:1))
|
---|
35 | WHERE Q $P($G(^DIC(4.2,(+^XTV(8989.3,1,0)),0)),"^")
|
---|
36 | INST Q $P($G(^XTV(8989.3,1,"XUS")),U,17)
|
---|
37 | LIFETIME Q $P($G(^XTV(8989.3,1,"XUS")),U,15) ;Verify code lifetime
|
---|