Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ORY4273

ORY4273.m

Go to the documentation of this file.
  1. ORY4273 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE ; 11/28/18 4:20am
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**427**;Dec 17,1997;Build 105
  1. ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
  1. ;
  1. ; Reference to ^DIR supported by DBIA #10026
  1. ; This is a post intall routine and can be deleted after install of patch OR*3*427
  1. S ;
  1. ; Multiple Utilities
  1. Q
  1. ;
  1. ADDMULT(OCXCREF,OCXDD,OCXFLD) ;
  1. ;
  1. ;
  1. N QUIT,OCXDA,OCXGREF,OCXNAME,DDPATH,INDEX
  1. ;
  1. S DDPATH=$P($P($$APPEND($$APPEND(OCXCREF,OCXDD),OCXFLD),"(",2),")",1)
  1. F INDEX=1:1:$L(DDPATH,",") S OCXDA($L(DDPATH,",")-INDEX)=+$P($P(DDPATH,",",INDEX),":",2)
  1. S OCXDA=$G(OCXDA(0)) K OCXDA(0)
  1. ;
  1. Q:(OCXFLAG["D") 0
  1. I (OCXFLAG["A") S QUIT=$$READ("Y"," Do you want to add a local '"_$$FILENAME^OCXSENDD(+OCXFLD)_"' multiple ?","YES") Q:'QUIT (QUIT[U)
  1. ;
  1. S OCXGREF=$$GETREF^ORY4272(+OCXFLD,.OCXDA,1)
  1. D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,1)
  1. ;
  1. Q 0
  1. ;
  1. DELMULT(OCXCREF,OCXDD) ;
  1. ;
  1. N QUIT,OCXGREF,DA,INDEX,DDPATH
  1. ;
  1. Q:(OCXFLAG["D") 0
  1. I (OCXFLAG["A") S QUIT=$$READ("Y"," Do you want to delete the local '"_$$FILENAME^OCXSENDD(+OCXDD)_"' multiple ?","YES") Q:'QUIT (QUIT[U)
  1. ;
  1. S DDPATH=$P($P($$APPEND(OCXCREF,OCXDD),"(",2),")",1)
  1. F INDEX=1:1:$L(DDPATH,",") S DA($L(DDPATH,",")-INDEX)=+$P($P(DDPATH,",",INDEX),":",2)
  1. S DA=$G(DA(0)) K DA(0)
  1. S OCXGREF=$$GETREF^ORY4272(+OCXDD,.DA,1)
  1. ;
  1. D DIE^ORY4272(+OCXDD,OCXGREF,.01,"@",.DA,$L(DDPATH,",")-1)
  1. K @OCXCREF@(OCXDD) W !!," deleted..."
  1. ;
  1. Q 0
  1. ;
  1. CREATE(OCXCREF,OCXDD,OCXDA,OCXLVL) ;
  1. ;
  1. N OCXFLD,OCXGREF
  1. ;
  1. S OCXGREF=$$GETREF^ORY4272(+OCXDD,.OCXDA,OCXLVL) Q:'$L(OCXGREF) S:'OCXDA OCXDA=$O(@(OCXGREF_"""@"")"),-1)+1
  1. ;
  1. I '$D(@(OCXGREF_"0)")) S @(OCXGREF_"0)")=U_$$FILEHDR^OCXSENDD(+OCXDD)_U_U
  1. ;
  1. S OCXFLD=0 F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'OCXFLD Q:(OCXFLD[":") I '$$EXFLD^ORY4271(+OCXDD,OCXFLD) D
  1. .I $L($G(@OCXCREF@(OCXDD,OCXFLD,"E"))) D DIE^ORY4272(OCXDD,OCXGREF,OCXFLD,@OCXCREF@(OCXDD,OCXFLD,"E"),.OCXDA,OCXLVL)
  1. ;
  1. D PUSH(.OCXDA)
  1. S OCXFLD="" F S OCXFLD=$O(@OCXCREF@(OCXDD,OCXFLD)) Q:'$L(OCXFLD) I (OCXFLD[":") D
  1. .S OCXDA=$P(OCXFLD,":",2) W ! D CREATE($$APPEND(OCXCREF,OCXDD),OCXFLD,.OCXDA,OCXLVL+1)
  1. D POP(.OCXDA)
  1. Q
  1. ;
  1. PUSH(OCXDA) ;
  1. N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB),-1) Q:'OCXSUB S OCXDA(OCXSUB+1)=OCXDA(OCXSUB)
  1. S OCXDA(1)=OCXDA,OCXDA=0
  1. Q
  1. ;
  1. POP(OCXDA) ;
  1. N OCXSUB S OCXSUB="" F S OCXSUB=$O(OCXDA(OCXSUB)) Q:'OCXSUB S OCXDA(OCXSUB)=$G(OCXDA(OCXSUB+1))
  1. S OCXDA=OCXDA(1) K OCXDA($O(OCXDA(""),-1))
  1. Q
  1. ;
  1. APPEND(ARRAY,OCXSUB) ;
  1. S:'(OCXSUB=+OCXSUB) OCXSUB=""""_OCXSUB_""""
  1. Q:'(ARRAY["(") ARRAY_"("_OCXSUB_")"
  1. Q $E(ARRAY,1,$L(ARRAY)-1)_","_OCXSUB_")"
  1. ;
  1. READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
  1. N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
  1. Q:'$L($G(OCXZ0)) U
  1. S DIR(0)=OCXZ0
  1. S:$L($G(OCXZA)) DIR("A")=OCXZA
  1. S:$L($G(OCXZB)) DIR("B")=OCXZB
  1. F OCXLINE=1:1:($G(OCXZL)-1) W !
  1. D ^DIR
  1. I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
  1. Q Y
  1. ;
  1. PAUSE() W " Press Enter " R X:DTIME W ! Q (X[U)
  1. ;