OCXBDT7 ;SLC/RJS,CLA - BUILD OCX PACKAGE DIAGNOSTIC ROUTINES (Build Runtime Library Routine OCXDI3) ;8/04/98 13:21
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
EN() ;
;
N R,LINE,TEXT,NOW,RUCI,XCM
S NOW=$$NOW^OCXBDT3,RUCI=$$CUCI^OCXBDT
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^OCXBDT3(TEXT)
;
M ^TMP("OCXBDT",$J,"RTN")=R
;
S DIE="^TMP(""OCXBDT"","_$J_",""RTN"",",XCN=0,X="OCXDI3"
W !,X X ^%ZOSF("SAVE") W " ... ",XCM," Lines filed" K ^TMP("OCXBDT",$J,"RTN")
;
Q XCM
;
TEXT ;
;;OCXDI3 ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC UTILITY ROUTINE ;|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:'OCXFLGC 0 I (OCXFLGA) S QUIT=$$READ("Y"," Do you want to add a local '"_$$FILENAME^OCXBDTD(+OCXFLD)_"' multiple ?","YES") Q:'QUIT (QUIT[U)
;; ;
;; S OCXGREF=$$GETREF^OCXDI2(+OCXFLD,.OCXDA,1)
;; D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,1)
;; ;
;; Q 0
;; ;
;;DELMULT(OCXCREF,OCXDD) ;
;; ;
;; N QUIT,OCXGREF,DA,INDEX,DDPATH
;; ;
;; Q:'OCXFLGC 0 I (OCXFLGA) S QUIT=$$READ("Y"," Do you want to delete the local '"_$$FILENAME^OCXBDTD(+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^OCXDI2(+OCXDD,.DA,1)
;; ;
;; D DIE^OCXDI2(+OCXDD,OCXGREF,.01,"@",.DA,$L(DDPATH,",")-1)
;; K @OCXCREF@(OCXDD) W:OCXFLGR !!," deleted..."
;; ;
;; Q 0
;; ;
;;CREATE(OCXCREF,OCXDD,OCXDA,OCXLVL) ;
;; ;
;; N OCXFLD,OCXGREF
;; ;
;; S OCXGREF=$$GETREF^OCXDI2(+OCXDD,.OCXDA,OCXLVL) Q:'$L(OCXGREF) S:'OCXDA OCXDA=$O(@(OCXGREF_"""@"")"),-1)+1
;; ;
;; I '$D(@(OCXGREF_"0)")) S @(OCXGREF_"0)")=U_$$FILEHDR^OCXBDTD(+OCXDD)_U_U
;; ;
;; S OCXFLD=0 F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'OCXFLD Q:(OCXFLD[":") I '$$EXFLD^OCXDI1(+OCXDD,OCXFLD) D
;; .I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D DIE^OCXDI2(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() Q:'OCXFLGC 0 W " Press Enter " R X:DTIME W ! Q (X[U)
;; ;
;;$
;1;
;
OCXBDT7 ;SLC/RJS,CLA - BUILD OCX PACKAGE DIAGNOSTIC ROUTINES (Build Runtime Library Routine OCXDI3) ;8/04/98 13:21
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
EN() ;
+1 ;
+2 NEW R,LINE,TEXT,NOW,RUCI,XCM
+3 SET NOW=$$NOW^OCXBDT3
SET RUCI=$$CUCI^OCXBDT
+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^OCXBDT3(TEXT)
+5 ;
+6 MERGE ^TMP("OCXBDT",$JOB,"RTN")=R
+7 ;
+8 SET DIE="^TMP(""OCXBDT"","_$JOB_",""RTN"","
SET XCN=0
SET X="OCXDI3"
+9 WRITE !,X
XECUTE ^%ZOSF("SAVE")
WRITE " ... ",XCM," Lines filed"
KILL ^TMP("OCXBDT",$JOB,"RTN")
+10 ;
+11 QUIT XCM
+12 ;
TEXT ;
+1 ;;OCXDI3 ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC UTILITY ROUTINE ;|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 ;; Q:'OCXFLGC 0 I (OCXFLGA) S QUIT=$$READ("Y"," Do you want to add a local '"_$$FILENAME^OCXBDTD(+OCXFLD)_"' multiple ?","YES") Q:'QUIT (QUIT[U)
+18 ;; ;
+19 ;; S OCXGREF=$$GETREF^OCXDI2(+OCXFLD,.OCXDA,1)
+20 ;; D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,1)
+21 ;; ;
+22 ;; Q 0
+23 ;; ;
+24 ;;DELMULT(OCXCREF,OCXDD) ;
+25 ;; ;
+26 ;; N QUIT,OCXGREF,DA,INDEX,DDPATH
+27 ;; ;
+28 ;; Q:'OCXFLGC 0 I (OCXFLGA) S QUIT=$$READ("Y"," Do you want to delete the local '"_$$FILENAME^OCXBDTD(+OCXDD)_"' multiple ?","YES") Q:'QUIT (QUIT[U)
+29 ;; ;
+30 ;; S DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
+31 ;; F INDEX=1:1:$L(DDPATH,",") S DA($L(DDPATH,",")-INDEX)=+$P($P(DDPATH,",",INDEX),":",2)
+32 ;; S DA=$G(DA(0)) K DA(0)
+33 ;; S OCXGREF=$$GETREF^OCXDI2(+OCXDD,.DA,1)
+34 ;; ;
+35 ;; D DIE^OCXDI2(+OCXDD,OCXGREF,.01,"@",.DA,$L(DDPATH,",")-1)
+36 ;; K @OCXCREF@(OCXDD) W:OCXFLGR !!," deleted..."
+37 ;; ;
+38 ;; Q 0
+39 ;; ;
+40 ;;CREATE(OCXCREF,OCXDD,OCXDA,OCXLVL) ;
+41 ;; ;
+42 ;; N OCXFLD,OCXGREF
+43 ;; ;
+44 ;; S OCXGREF=$$GETREF^OCXDI2(+OCXDD,.OCXDA,OCXLVL) Q:'$L(OCXGREF) S:'OCXDA OCXDA=$O(@(OCXGREF_"""@"")"),-1)+1
+45 ;; ;
+46 ;; I '$D(@(OCXGREF_"0)")) S @(OCXGREF_"0)")=U_$$FILEHDR^OCXBDTD(+OCXDD)_U_U
+47 ;; ;
+48 ;; S OCXFLD=0 F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'OCXFLD Q:(OCXFLD[":") I '$$EXFLD^OCXDI1(+OCXDD,OCXFLD) D
+49 ;; .I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D DIE^OCXDI2(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL)
+50 ;; ;
+51 ;; D PUSH(.OCXDA)
+52 ;; S OCXFLD="" F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'$L(OCXFLD) I (OCXFLD[":") D
+53 ;; .S OCXDA=$P(OCXFLD,":",2) W ! D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,OCXLVL+1)
+54 ;; D POP(.OCXDA)
+55 ;; Q
+56 ;; ;
+57 ;;PUSH(OCXDA) ;
+58 ;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB),-1) Q:'OCXSUB S OCXDA(OCXSUB+1)=OCXDA(OCXSUB)
+59 ;; S OCXDA(1)=OCXDA,OCXDA=0
+60 ;; Q
+61 ;; ;
+62 ;;POP(OCXDA) ;
+63 ;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB)) Q:'OCXSUB S OCXDA(OCXSUB)=$G(OCXDA(OCXSUB+1))
+64 ;; S OCXDA=OCXDA(1) K OCXDA($O(OCXDA(""),-1))
+65 ;; Q
+66 ;; ;
+67 ;;APPEND(ARRAY,OCXSUB) ;
+68 ;; S:'(OCXSUB=+OCXSUB) OCXSUB=""""_OCXSUB_""""
+69 ;; Q:'(ARRAY["(") ARRAY_"("_OCXSUB_")"
+70 ;; Q $E(ARRAY,1,$L(ARRAY)-1)_","_OCXSUB_")"
+71 ;; ;
+72 ;;READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
+73 ;; N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
+74 ;; Q:'$L($G(OCXZ0)) U
+75 ;; S DIR(0)=OCXZ0
+76 ;; S:$L($G(OCXZA)) DIR("A")=OCXZA
+77 ;; S:$L($G(OCXZB)) DIR("B")=OCXZB
+78 ;; F OCXLINE=1:1:($G(OCXZL)-1) W !
+79 ;; D ^DIR
+80 ;; I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
+81 ;; Q Y
+82 ;; ;
+83 ;;PAUSE() Q:'OCXFLGC 0 W " Press Enter " R X:DTIME W ! Q (X[U)
+84 ;; ;
+85 ;;$
+86 ;1;
+87 ;