OCXBDT8 ;SLC/RJS,CLA - BUILD OCX PACKAGE DIAGNOSTIC ROUTINES (Build Runtime Library Routine OCXDI4) ;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="OCXDI4"
W !,X X ^%ZOSF("SAVE") W " ... ",XCM," Lines filed" K ^TMP("OCXBDT",$J,"RTN")
;
Q XCM
;
TEXT ;
;;OCXDI4 ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC UTILITY ROUTINE ;|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:'OCXFLGC I (OCXFLGA) S RESP=$$READ("Y"," Do you want to change the local '"_$$FILENAME^OCXBDTD(+OCXDD)_"' field ?","YES") I 'RESP S QUIT=(RESP[U) Q
;; .S OCXGREF=$$GETREF^OCXDI2(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
;; .D DIE^OCXDI2(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:'OCXFLGC 0 I (OCXFLGA) S RESP=$$READ("Y"," Do you want to Delete the local '"_$$FILENAME^OCXBDTD(+OCXDD)_"' value ?","YES") I 'RESP S QUIT=(RESP[U) Q QUIT
;; S OCXGREF=$$GETREF^OCXDI2(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
;; D DIE^OCXDI2(OCXDD,OCXGREF,OCXFLD,"@",.OCXDA,OCXLVL-1)
;; ;
;; Q QUIT
;; ;
;;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;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOCXBDT8 3794 printed Nov 22, 2024@17:32:27 Page 2
OCXBDT8 ;SLC/RJS,CLA - BUILD OCX PACKAGE DIAGNOSTIC ROUTINES (Build Runtime Library Routine OCXDI4) ;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="OCXDI4"
+9 WRITE !,X
XECUTE ^%ZOSF("SAVE")
WRITE " ... ",XCM," Lines filed"
KILL ^TMP("OCXBDT",$JOB,"RTN")
+10 ;
+11 QUIT XCM
+12 ;
TEXT ;
+1 ;;OCXDI4 ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC UTILITY ROUTINE ;|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:'OCXFLGC I (OCXFLGA) S RESP=$$READ("Y"," Do you want to change the local '"_$$FILENAME^OCXBDTD(+OCXDD)_"' field ?","YES") I 'RESP S QUIT=(RESP[U) Q
+20 ;; .S OCXGREF=$$GETREF^OCXDI2(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
+21 ;; .D DIE^OCXDI2(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL-1)
+22 ;; ;
+23 ;; Q QUIT
+24 ;; ;
+25 ;;DELFLD(OCXCREF,OCXDD,OCXFLD,OCXSUB) ;
+26 ;; ;
+27 ;; N DDPATH,OCXDA,OCXPC,OCXLVL,QUIT,RESP
+28 ;; ;
+29 ;; S QUIT=0,DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
+30 ;; S OCXLVL=$L(DDPATH,",")
+31 ;; F OCXPC=1:1:OCXLVL S OCXDA(OCXLVL-OCXPC)=+$P($P(DDPATH,",",OCXPC),":",2)
+32 ;; S OCXDA=OCXDA(0) K OCXDA(0)
+33 ;; Q:'OCXFLGC 0 I (OCXFLGA) S RESP=$$READ("Y"," Do you want to Delete the local '"_$$FILENAME^OCXBDTD(+OCXDD)_"' value ?","YES") I 'RESP S QUIT=(RESP[U) Q QUIT
+34 ;; S OCXGREF=$$GETREF^OCXDI2(+OCXDD,.OCXDA,OCXLVL-1) Q:'$L(OCXGREF)
+35 ;; D DIE^OCXDI2(OCXDD,OCXGREF,OCXFLD,"@",.OCXDA,OCXLVL-1)
+36 ;; ;
+37 ;; Q QUIT
+38 ;; ;
+39 ;;CREATE(OCXCREF,OCXDD,OCXDA,OCXLVL) ;
+40 ;; ;
+41 ;; N OCXFLD,OCXGREF
+42 ;; ;
+43 ;; S OCXGREF=$$GETREF^OCXDI2(+OCXDD,.OCXDA,OCXLVL) Q:'$L(OCXGREF) S:'OCXDA OCXDA=$O(@(OCXGREF_"""@"")"),-1)+1
+44 ;; ;
+45 ;; I '$D(@(OCXGREF_"0)")) S @(OCXGREF_"0)")=U_$$FILEHDR^OCXBDTD(+OCXDD)_U_U
+46 ;; ;
+47 ;; S OCXFLD=0 F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'OCXFLD Q:(OCXFLD[":") I '$$EXFLD^OCXDI1(+OCXDD,OCXFLD) D
+48 ;; .I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D DIE^OCXDI2(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL)
+49 ;; ;
+50 ;; D PUSH(.OCXDA)
+51 ;; S OCXFLD="" F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'$L(OCXFLD) I (OCXFLD[":") D
+52 ;; .S OCXDA=$P(OCXFLD,":",2) W ! D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,OCXLVL+1)
+53 ;; D POP(.OCXDA)
+54 ;; Q
+55 ;; ;
+56 ;;PUSH(OCXDA) ;
+57 ;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB),-1) Q:'OCXSUB S OCXDA(OCXSUB+1)=OCXDA(OCXSUB)
+58 ;; S OCXDA(1)=OCXDA,OCXDA=0
+59 ;; Q
+60 ;; ;
+61 ;;POP(OCXDA) ;
+62 ;; N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB)) Q:'OCXSUB S OCXDA(OCXSUB)=$G(OCXDA(OCXSUB+1))
+63 ;; S OCXDA=OCXDA(1) K OCXDA($O(OCXDA(""),-1))
+64 ;; Q
+65 ;; ;
+66 ;;APPEND(ARRAY,OCXSUB) ;
+67 ;; S:'(OCXSUB=+OCXSUB) OCXSUB=""""_OCXSUB_""""
+68 ;; Q:'(ARRAY["(") ARRAY_"("_OCXSUB_")"
+69 ;; Q $E(ARRAY,1,$L(ARRAY)-1)_","_OCXSUB_")"
+70 ;; ;
+71 ;;READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
+72 ;; N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
+73 ;; Q:'$L($G(OCXZ0)) U
+74 ;; S DIR(0)=OCXZ0
+75 ;; S:$L($G(OCXZA)) DIR("A")=OCXZA
+76 ;; S:$L($G(OCXZB)) DIR("B")=OCXZB
+77 ;; F OCXLINE=1:1:($G(OCXZL)-1) W !
+78 ;; D ^DIR
+79 ;; I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
+80 ;; Q Y
+81 ;; ;
+82 ;;PAUSE() Q:'OCXFLGC 0 W " Press Enter " R X:DTIME W ! Q (X[U)
+83 ;; ;
+84 ;;$
+85 ;1;
+86 ;