OCXSEND8 ;SLC/RJS,CLA - BUILD RULE TRANSPORTER ROUTINES (Build Library Routine 4) ;1/31/01 08:44
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,96,105,243**;Dec 17,1997;Build 242
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
EN() ;
;
N R,LINE,TEXT,NOW,RUCI
S NOW=$$NOW^OCXSEND3,RUCI=$$NETNAME^OCXSEND
F LINE=1:1:999 S TEXT=$P($T(TEXT+LINE),";",2,999) Q:TEXT S TEXT=$P(TEXT,";",2,999) S R(LINE,0)=$$CONV^OCXSEND3(TEXT)
;
M ^TMP("OCXSEND",$J,"RTN")=R
;
S DIE="^TMP(""OCXSEND"","_$J_",""RTN"",",XCN=0,X=$$RNAME^OCXSEND3(4,1)
W !,X X ^%ZOSF("SAVE") K ^TMP("OCXSEND",$J,"RTN")
;
Q " "
;
TEXT ;
;;|$$RNAME^OCXSEND3(4,1)| ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE |OCXPATCH| ;|NOW|
;;|OCXLIN2|
;;|OCXLIN3|
;; ;
;;S ;
;; ; Field Utilities
;; Q
;; ;
;;EDITFLD(OCXCREF,OCXDD,OCXFLD,OCXSUB) ;
;; ;
;; N DDPATH,OCXDA,OCXPC,OCXLVL,QUIT
;; ;
;; S QUIT=0,DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
;; S OCXLVL=$L(DDPATH,",")
;; F OCXPC=1:1:OCXLVL S OCXDA(OCXLVL-OCXPC)=+$P($P(DDPATH,",",OCXPC),":",2)
;; S OCXDA=OCXDA(0) K OCXDA(0)
;; I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D
;; .N RESP
;; .Q:(OCXFLAG["D")
;; .I (OCXFLAG["A") S RESP=$$READ("Y"," Do you want to change the local '"_$$FILENAME^OCXSENDD(+OCXDD)_"' field ?","YES") I 'RESP S QUIT=(RESP[U) Q
;; .S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
;; .D DIE^|$$RNAME^OCXSEND3(2,1)|(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL-1)
;; ;
;; Q QUIT
;; ;
;;DELFLD(OCXCREF,OCXDD,OCXFLD,OCXSUB) ;
;; ;
;; N DDPATH,OCXDA,OCXPC,OCXLVL,QUIT,RESP
;; ;
;; S QUIT=0,DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
;; S OCXLVL=$L(DDPATH,",")
;; F OCXPC=1:1:OCXLVL S OCXDA(OCXLVL-OCXPC)=+$P($P(DDPATH,",",OCXPC),":",2)
;; S OCXDA=OCXDA(0) K OCXDA(0)
;; Q:(OCXFLAG["D") 0
;; I (OCXFLAG["A") S RESP=$$READ("Y"," Do you want to Delete the local '"_$$FILENAME^OCXSENDD(+OCXDD)_"' value ?","YES") I 'RESP S QUIT=(RESP[U) Q QUIT
;; S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
;; D DIE^|$$RNAME^OCXSEND3(2,1)|(OCXDD,OCXGREF,OCXFLD,"@",.OCXDA,OCXLVL-1)
;; ;
;; Q QUIT
;; ;
;;CREATE(OCXCREF,OCXDD,OCXDA,OCXLVL) ;
;; ;
;; N OCXFLD,OCXGREF
;; ;
;; S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.OCXDA,OCXLVL) Q:'$L(OCXGREF) S:'OCXDA OCXDA=$O(@(OCXGREF_"""@"")"),-1)+1
;; ;
;; I '$D(@(OCXGREF_"0)")) S @(OCXGREF_"0)")=U_$$FILEHDR^OCXSENDD(+OCXDD)_U_U
;; ;
;; S OCXFLD=0 F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'OCXFLD Q:(OCXFLD[":") I '$$EXFLD^|$$RNAME^OCXSEND3(1,1)|(+OCXDD,OCXFLD) D
;; .I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D DIE^|$$RNAME^OCXSEND3(2,1)|(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL)
;; ;
;; D PUSH(.OCXDA)
;; S OCXFLD="" F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'$L(OCXFLD) I (OCXFLD[":") D
;; .S OCXDA=$P(OCXFLD,":",2) W ! D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,OCXLVL+1)
;; D POP(.OCXDA)
;; Q
;; ;
;;PUSH(OCXDA) ;
;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB),-1) Q:'OCXSUB S OCXDA(OCXSUB+1)=OCXDA(OCXSUB)
;; S OCXDA(1)=OCXDA,OCXDA=0
;; Q
;; ;
;;POP(OCXDA) ;
;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB)) Q:'OCXSUB S OCXDA(OCXSUB)=$G(OCXDA(OCXSUB+1))
;; S OCXDA=OCXDA(1) K OCXDA($O(OCXDA(""),-1))
;; Q
;; ;
;;APPEND(ARRAY,OCXSUB) ;
;; S:'(OCXSUB=+OCXSUB) OCXSUB=""""_OCXSUB_""""
;; Q:'(ARRAY["(") ARRAY_"("_OCXSUB_")"
;; Q $E(ARRAY,1,$L(ARRAY)-1)_","_OCXSUB_")"
;; ;
;;READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
;; N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
;; Q:'$L($G(OCXZ0)) U
;; S DIR(0)=OCXZ0
;; S:$L($G(OCXZA)) DIR("A")=OCXZA
;; S:$L($G(OCXZB)) DIR("B")=OCXZB
;; F OCXLINE=1:1:($G(OCXZL)-1) W !
;; D ^DIR
;; I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
;; Q Y
;; ;
;;PAUSE() W " Press Enter " R X:DTIME W ! Q (X[U)
;; ;
;;$
;1;
;
OCXSEND8 ;SLC/RJS,CLA - BUILD RULE TRANSPORTER ROUTINES (Build Library Routine 4) ;1/31/01 08:44
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,96,105,243**;Dec 17,1997;Build 242
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
EN() ;
+1 ;
+2 NEW R,LINE,TEXT,NOW,RUCI
+3 SET NOW=$$NOW^OCXSEND3
SET RUCI=$$NETNAME^OCXSEND
+4 FOR LINE=1:1:999
SET TEXT=$PIECE($TEXT(TEXT+LINE),";",2,999)
IF TEXT
QUIT
SET TEXT=$PIECE(TEXT,";",2,999)
SET R(LINE,0)=$$CONV^OCXSEND3(TEXT)
+5 ;
+6 MERGE ^TMP("OCXSEND",$JOB,"RTN")=R
+7 ;
+8 SET DIE="^TMP(""OCXSEND"","_$JOB_",""RTN"","
SET XCN=0
SET X=$$RNAME^OCXSEND3(4,1)
+9 WRITE !,X
XECUTE ^%ZOSF("SAVE")
KILL ^TMP("OCXSEND",$JOB,"RTN")
+10 ;
+11 QUIT " "
+12 ;
TEXT ;
+1 ;;|$$RNAME^OCXSEND3(4,1)| ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE |OCXPATCH| ;|NOW|
+2 ;;|OCXLIN2|
+3 ;;|OCXLIN3|
+4 ;; ;
+5 ;;S ;
+6 ;; ; Field Utilities
+7 ;; Q
+8 ;; ;
+9 ;;EDITFLD(OCXCREF,OCXDD,OCXFLD,OCXSUB) ;
+10 ;; ;
+11 ;; N DDPATH,OCXDA,OCXPC,OCXLVL,QUIT
+12 ;; ;
+13 ;; S QUIT=0,DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
+14 ;; S OCXLVL=$L(DDPATH,",")
+15 ;; F OCXPC=1:1:OCXLVL S OCXDA(OCXLVL-OCXPC)=+$P($P(DDPATH,",",OCXPC),":",2)
+16 ;; S OCXDA=OCXDA(0) K OCXDA(0)
+17 ;; I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D
+18 ;; .N RESP
+19 ;; .Q:(OCXFLAG["D")
+20 ;; .I (OCXFLAG["A") S RESP=$$READ("Y"," Do you want to change the local '"_$$FILENAME^OCXSENDD(+OCXDD)_"' field ?","YES") I 'RESP S QUIT=(RESP[U) Q
+21 ;; .S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
+22 ;; .D DIE^|$$RNAME^OCXSEND3(2,1)|(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL-1)
+23 ;; ;
+24 ;; Q QUIT
+25 ;; ;
+26 ;;DELFLD(OCXCREF,OCXDD,OCXFLD,OCXSUB) ;
+27 ;; ;
+28 ;; N DDPATH,OCXDA,OCXPC,OCXLVL,QUIT,RESP
+29 ;; ;
+30 ;; S QUIT=0,DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
+31 ;; S OCXLVL=$L(DDPATH,",")
+32 ;; F OCXPC=1:1:OCXLVL S OCXDA(OCXLVL-OCXPC)=+$P($P(DDPATH,",",OCXPC),":",2)
+33 ;; S OCXDA=OCXDA(0) K OCXDA(0)
+34 ;; Q:(OCXFLAG["D") 0
+35 ;; I (OCXFLAG["A") S RESP=$$READ("Y"," Do you want to Delete the local '"_$$FILENAME^OCXSENDD(+OCXDD)_"' value ?","YES") I 'RESP S QUIT=(RESP[U) Q QUIT
+36 ;; S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
+37 ;; D DIE^|$$RNAME^OCXSEND3(2,1)|(OCXDD,OCXGREF,OCXFLD,"@",.OCXDA,OCXLVL-1)
+38 ;; ;
+39 ;; Q QUIT
+40 ;; ;
+41 ;;CREATE(OCXCREF,OCXDD,OCXDA,OCXLVL) ;
+42 ;; ;
+43 ;; N OCXFLD,OCXGREF
+44 ;; ;
+45 ;; S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.OCXDA,OCXLVL) Q:'$L(OCXGREF) S:'OCXDA OCXDA=$O(@(OCXGREF_"""@"")"),-1)+1
+46 ;; ;
+47 ;; I '$D(@(OCXGREF_"0)")) S @(OCXGREF_"0)")=U_$$FILEHDR^OCXSENDD(+OCXDD)_U_U
+48 ;; ;
+49 ;; S OCXFLD=0 F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'OCXFLD Q:(OCXFLD[":") I '$$EXFLD^|$$RNAME^OCXSEND3(1,1)|(+OCXDD,OCXFLD) D
+50 ;; .I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D DIE^|$$RNAME^OCXSEND3(2,1)|(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL)
+51 ;; ;
+52 ;; D PUSH(.OCXDA)
+53 ;; S OCXFLD="" F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'$L(OCXFLD) I (OCXFLD[":") D
+54 ;; .S OCXDA=$P(OCXFLD,":",2) W ! D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,OCXLVL+1)
+55 ;; D POP(.OCXDA)
+56 ;; Q
+57 ;; ;
+58 ;;PUSH(OCXDA) ;
+59 ;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB),-1) Q:'OCXSUB S OCXDA(OCXSUB+1)=OCXDA(OCXSUB)
+60 ;; S OCXDA(1)=OCXDA,OCXDA=0
+61 ;; Q
+62 ;; ;
+63 ;;POP(OCXDA) ;
+64 ;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB)) Q:'OCXSUB S OCXDA(OCXSUB)=$G(OCXDA(OCXSUB+1))
+65 ;; S OCXDA=OCXDA(1) K OCXDA($O(OCXDA(""),-1))
+66 ;; Q
+67 ;; ;
+68 ;;APPEND(ARRAY,OCXSUB) ;
+69 ;; S:'(OCXSUB=+OCXSUB) OCXSUB=""""_OCXSUB_""""
+70 ;; Q:'(ARRAY["(") ARRAY_"("_OCXSUB_")"
+71 ;; Q $E(ARRAY,1,$L(ARRAY)-1)_","_OCXSUB_")"
+72 ;; ;
+73 ;;READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
+74 ;; N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
+75 ;; Q:'$L($G(OCXZ0)) U
+76 ;; S DIR(0)=OCXZ0
+77 ;; S:$L($G(OCXZA)) DIR("A")=OCXZA
+78 ;; S:$L($G(OCXZB)) DIR("B")=OCXZB
+79 ;; F OCXLINE=1:1:($G(OCXZL)-1) W !
+80 ;; D ^DIR
+81 ;; I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
+82 ;; Q Y
+83 ;; ;
+84 ;;PAUSE() W " Press Enter " R X:DTIME W ! Q (X[U)
+85 ;; ;
+86 ;;$
+87 ;1;
+88 ;