OCXSEND7 ;SLC/RJS,CLA - BUILD RULE TRANSPORTER ROUTINES (Build Library Routine 3) ;1/31/01 11:07
;;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(3,1)
W !,X X ^%ZOSF("SAVE") K ^TMP("OCXSEND",$J,"RTN")
;
Q " "
;
TEXT ;
;;|$$RNAME^OCXSEND3(3,1)| ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE |OCXPATCH| ;|NOW|
;;|OCXLIN2|
;;|OCXLIN3|
;; ;
;;S ;
;; ; Multiple Utilities
;; Q
;; ;
;;ADDMULT(OCXCREF,OCXDD,OCXFLD) ;
;; ;
;; ;
;; N QUIT,OCXDA,OCXGREF,OCXNAME,DDPATH,INDEX
;; ;
;; S DDPATH=$P($P($$APPEND($$APPEND(OCXCREF,OCXDD),OCXFLD),"(",2),")",1)
;; F INDEX=1:1:$L(DDPATH,",") S OCXDA($L(DDPATH,",")-INDEX)=+$P($P(DDPATH,",",INDEX),":",2)
;; S OCXDA=$G(OCXDA(0)) K OCXDA(0)
;; ;
;; Q:(OCXFLAG["D") 0
;; I (OCXFLAG["A") S QUIT=$$READ("Y"," Do you want to add a local '"_$$FILENAME^OCXSENDD(+OCXFLD)_"' multiple ?","YES") Q:'QUIT (QUIT[U)
;; ;
;; S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXFLD,.OCXDA,1)
;; D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,1)
;; ;
;; Q 0
;; ;
;;DELMULT(OCXCREF,OCXDD) ;
;; ;
;; N QUIT,OCXGREF,DA,INDEX,DDPATH
;; ;
;; Q:(OCXFLAG["D") 0
;; I (OCXFLAG["A") S QUIT=$$READ("Y"," Do you want to delete the local '"_$$FILENAME^OCXSENDD(+OCXDD)_"' multiple ?","YES") Q:'QUIT (QUIT[U)
;; ;
;; S DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
;; F INDEX=1:1:$L(DDPATH,",") S DA($L(DDPATH,",")-INDEX)=+$P($P(DDPATH,",",INDEX),":",2)
;; S DA=$G(DA(0)) K DA(0)
;; S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.DA,1)
;; ;
;; D DIE^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,OCXGREF,.01,"@",.DA,$L(DDPATH,",")-1)
;; K @OCXCREF@(OCXDD) W !!," deleted..."
;; ;
;; Q 0
;; ;
;;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;
;
OCXSEND7 ;SLC/RJS,CLA - BUILD RULE TRANSPORTER ROUTINES (Build Library Routine 3) ;1/31/01 11:07
+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(3,1)
+9 WRITE !,X
XECUTE ^%ZOSF("SAVE")
KILL ^TMP("OCXSEND",$JOB,"RTN")
+10 ;
+11 QUIT " "
+12 ;
TEXT ;
+1 ;;|$$RNAME^OCXSEND3(3,1)| ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE |OCXPATCH| ;|NOW|
+2 ;;|OCXLIN2|
+3 ;;|OCXLIN3|
+4 ;; ;
+5 ;;S ;
+6 ;; ; Multiple Utilities
+7 ;; Q
+8 ;; ;
+9 ;;ADDMULT(OCXCREF,OCXDD,OCXFLD) ;
+10 ;; ;
+11 ;; ;
+12 ;; N QUIT,OCXDA,OCXGREF,OCXNAME,DDPATH,INDEX
+13 ;; ;
+14 ;; S DDPATH=$P($P($$APPEND($$APPEND(OCXCREF,OCXDD),OCXFLD),"(",2),")",1)
+15 ;; F INDEX=1:1:$L(DDPATH,",") S OCXDA($L(DDPATH,",")-INDEX)=+$P($P(DDPATH,",",INDEX),":",2)
+16 ;; S OCXDA=$G(OCXDA(0)) K OCXDA(0)
+17 ;; ;
+18 ;; Q:(OCXFLAG["D") 0
+19 ;; I (OCXFLAG["A") S QUIT=$$READ("Y"," Do you want to add a local '"_$$FILENAME^OCXSENDD(+OCXFLD)_"' multiple ?","YES") Q:'QUIT (QUIT[U)
+20 ;; ;
+21 ;; S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXFLD,.OCXDA,1)
+22 ;; D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,1)
+23 ;; ;
+24 ;; Q 0
+25 ;; ;
+26 ;;DELMULT(OCXCREF,OCXDD) ;
+27 ;; ;
+28 ;; N QUIT,OCXGREF,DA,INDEX,DDPATH
+29 ;; ;
+30 ;; Q:(OCXFLAG["D") 0
+31 ;; I (OCXFLAG["A") S QUIT=$$READ("Y"," Do you want to delete the local '"_$$FILENAME^OCXSENDD(+OCXDD)_"' multiple ?","YES") Q:'QUIT (QUIT[U)
+32 ;; ;
+33 ;; S DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
+34 ;; F INDEX=1:1:$L(DDPATH,",") S DA($L(DDPATH,",")-INDEX)=+$P($P(DDPATH,",",INDEX),":",2)
+35 ;; S DA=$G(DA(0)) K DA(0)
+36 ;; S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.DA,1)
+37 ;; ;
+38 ;; D DIE^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,OCXGREF,.01,"@",.DA,$L(DDPATH,",")-1)
+39 ;; K @OCXCREF@(OCXDD) W !!," deleted..."
+40 ;; ;
+41 ;; Q 0
+42 ;; ;
+43 ;;CREATE(OCXCREF,OCXDD,OCXDA,OCXLVL) ;
+44 ;; ;
+45 ;; N OCXFLD,OCXGREF
+46 ;; ;
+47 ;; S OCXGREF=$$GETREF^|$$RNAME^OCXSEND3(2,1)|(+OCXDD,.OCXDA,OCXLVL) Q:'$L(OCXGREF) S:'OCXDA OCXDA=$O(@(OCXGREF_"""@"")"),-1)+1
+48 ;; ;
+49 ;; I '$D(@(OCXGREF_"0)")) S @(OCXGREF_"0)")=U_$$FILEHDR^OCXSENDD(+OCXDD)_U_U
+50 ;; ;
+51 ;; S OCXFLD=0 F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'OCXFLD Q:(OCXFLD[":") I '$$EXFLD^|$$RNAME^OCXSEND3(1,1)|(+OCXDD,OCXFLD) D
+52 ;; .I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D DIE^|$$RNAME^OCXSEND3(2,1)|(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL)
+53 ;; ;
+54 ;; D PUSH(.OCXDA)
+55 ;; S OCXFLD="" F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'$L(OCXFLD) I (OCXFLD[":") D
+56 ;; .S OCXDA=$P(OCXFLD,":",2) W ! D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,OCXLVL+1)
+57 ;; D POP(.OCXDA)
+58 ;; Q
+59 ;; ;
+60 ;;PUSH(OCXDA) ;
+61 ;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB),-1) Q:'OCXSUB S OCXDA(OCXSUB+1)=OCXDA(OCXSUB)
+62 ;; S OCXDA(1)=OCXDA,OCXDA=0
+63 ;; Q
+64 ;; ;
+65 ;;POP(OCXDA) ;
+66 ;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB)) Q:'OCXSUB S OCXDA(OCXSUB)=$G(OCXDA(OCXSUB+1))
+67 ;; S OCXDA=OCXDA(1) K OCXDA($O(OCXDA(""),-1))
+68 ;; Q
+69 ;; ;
+70 ;;APPEND(ARRAY,OCXSUB) ;
+71 ;; S:'(OCXSUB=+OCXSUB) OCXSUB=""""_OCXSUB_""""
+72 ;; Q:'(ARRAY["(") ARRAY_"("_OCXSUB_")"
+73 ;; Q $E(ARRAY,1,$L(ARRAY)-1)_","_OCXSUB_")"
+74 ;; ;
+75 ;;READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
+76 ;; N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
+77 ;; Q:'$L($G(OCXZ0)) U
+78 ;; S DIR(0)=OCXZ0
+79 ;; S:$L($G(OCXZA)) DIR("A")=OCXZA
+80 ;; S:$L($G(OCXZB)) DIR("B")=OCXZB
+81 ;; F OCXLINE=1:1:($G(OCXZL)-1) W !
+82 ;; D ^DIR
+83 ;; I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
+84 ;; Q Y
+85 ;; ;
+86 ;;PAUSE() W " Press Enter " R X:DTIME W ! Q (X[U)
+87 ;; ;
+88 ;;$
+89 ;1;
+90 ;