XWBZ1 ;ISC-SF/EG - DHCP BROKER PROTOYPE TESTER [ 02/22/95 11:07 PM ] ;03/28/97 14:50
;;1.1;RPC BROKER;;Mar 28, 1997
ECHO1(Y,X) ;don't call direct
S Y=X
Q
;
GLOB1(Y,N) ;callback for global parameter - don't call direct
S Y=$NA(@N)
Q
;
LIST(Y) ; -- return list box with 28 entries
N I
F I=1:1:28 S Y(I)="List Item #"_I
Q
;
WP(Y) ; -- return text a word processing (50 lines)
N I
F I=1:1:50 S Y(I)="The quick brown fox jumped over the lazy dog."
S Y(51)="End of document."
Q
;
BIG(Y) ; -- send a 32K string
N I,Z
S $P(Z,"D",16)=""
K ^TMP($J,"XWBBIG")
F I=1:1:2048 S ^TMP($J,"XWBBIG",I)=Z
S Y=$NA(^TMP($J,"XWBBIG"))
Q
;
SRT(Y,D,X) ; -- sort array x and return in y
N I,K,T
S K=""
IF D="LO" D Q
. F I=1:1 D Q:K=""
. . S K=$O(X(K)) Q:K=""
. . S Y(I)=K
IF D="HI" D
. F I=1:1 D Q:K=""
. . S K=$O(X(K)) Q:K=""
. . S T(99999999-I)=K
. S K=0
. F I=1:1 D Q:K=""
. . S K=$O(T(K)) Q:K=""
. . S Y(I)=T(K)
Q
;
MEMO(Y,X) ;
K ^TMP("EG",$J,"MEMO")
S ^TMP("EG",$J,"MEMO",-9000)="DHCP RECEIVED:"
M ^TMP("EG",$J,"MEMO")=X
S Y=$NA(^TMP("EG",$J,"MEMO"))
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXWBZ1 1138 printed Nov 22, 2024@17:47:34 Page 2
XWBZ1 ;ISC-SF/EG - DHCP BROKER PROTOYPE TESTER [ 02/22/95 11:07 PM ] ;03/28/97 14:50
+1 ;;1.1;RPC BROKER;;Mar 28, 1997
ECHO1(Y,X) ;don't call direct
+1 SET Y=X
+2 QUIT
+3 ;
GLOB1(Y,N) ;callback for global parameter - don't call direct
+1 SET Y=$NAME(@N)
+2 QUIT
+3 ;
LIST(Y) ; -- return list box with 28 entries
+1 NEW I
+2 FOR I=1:1:28
SET Y(I)="List Item #"_I
+3 QUIT
+4 ;
WP(Y) ; -- return text a word processing (50 lines)
+1 NEW I
+2 FOR I=1:1:50
SET Y(I)="The quick brown fox jumped over the lazy dog."
+3 SET Y(51)="End of document."
+4 QUIT
+5 ;
BIG(Y) ; -- send a 32K string
+1 NEW I,Z
+2 SET $PIECE(Z,"D",16)=""
+3 KILL ^TMP($JOB,"XWBBIG")
+4 FOR I=1:1:2048
SET ^TMP($JOB,"XWBBIG",I)=Z
+5 SET Y=$NAME(^TMP($JOB,"XWBBIG"))
+6 QUIT
+7 ;
SRT(Y,D,X) ; -- sort array x and return in y
+1 NEW I,K,T
+2 SET K=""
+3 IF D="LO"
Begin DoDot:1
+4 FOR I=1:1
Begin DoDot:2
+5 SET K=$ORDER(X(K))
if K=""
QUIT
+6 SET Y(I)=K
End DoDot:2
if K=""
QUIT
End DoDot:1
QUIT
+7 IF D="HI"
Begin DoDot:1
+8 FOR I=1:1
Begin DoDot:2
+9 SET K=$ORDER(X(K))
if K=""
QUIT
+10 SET T(99999999-I)=K
End DoDot:2
if K=""
QUIT
+11 SET K=0
+12 FOR I=1:1
Begin DoDot:2
+13 SET K=$ORDER(T(K))
if K=""
QUIT
+14 SET Y(I)=T(K)
End DoDot:2
if K=""
QUIT
End DoDot:1
+15 QUIT
+16 ;
MEMO(Y,X) ;
+1 KILL ^TMP("EG",$JOB,"MEMO")
+2 SET ^TMP("EG",$JOB,"MEMO",-9000)="DHCP RECEIVED:"
+3 MERGE ^TMP("EG",$JOB,"MEMO")=X
+4 SET Y=$NAME(^TMP("EG",$JOB,"MEMO"))
+5 QUIT
+6 ;