OCXOCMPU ;SLC/RJS,CLA - ORDER CHECK CODE COMPILER (Build Local Term Translator) ;2/02/99 11:33
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
Q
;
TERMLKUP ;
;
N OCXSR,OCXD0,OCXD1,OCXNAME,TEXT,OCXREC,OCXFILE
;
S OCXSR=""
D INCLUDE("TERMLKUP(OCXTERM,OCXLIST) ;")
;
I OCXTRACE D
.D INCLUDE(" W:$G(OCXTRACE) !,||LNTAG||,?27,""Compiler Function TERMLKUP(OCXTERM,OCXLIST) Execution trace. """)
.D INCLUDE(" W:$G(OCXTRACE) !,?35,"" OCXTERM: "",$G(OCXTERM)")
.D INCLUDE(" ;")
D INCLUDE(" Q $$||LINE:"_$$LINE^OCXOCMP4("TERM","OCXTERM","OCXLIST")_"||(OCXTERM,.OCXLIST)")
D INCLUDE(" ;")
;
K ^TMP("OCXCMP",$J,"INCLUDE","TERMLKUP")
M ^TMP("OCXCMP",$J,"INCLUDE","TERMLKUP")=OCXSR
;
Q
;
TERM ;
;
N OCXSR,OCXD0,OCXD1,OCXNAME,TEXT,OCXREC,OCXFILE
;
D IN(" Q:'$L(OCXTERM) 0")
D IN(" ;")
;
D IN(" N FILE,IEN,LINE,LTERM,NTERM,TEXT S FILE=0 K OCXLIST")
D IN(" F LINE=1:1:999 S TEXT=$T(TERM+LINE) Q:$P(TEXT,"";"",2) I ($E(TEXT,2,3)="";;"") D")
D IN(" .S TEXT=$P(TEXT,"";;"",2)")
D IN(" .S NTERM=$P(TEXT,U,1) Q:'$L(NTERM) Q:'(OCXTERM=NTERM)")
D IN(" .S FILE=$P(TEXT,U,2),IEN=$P(TEXT,U,3),LTERM=$P(TEXT,U,4)")
D IN(" .S OCXLIST(IEN)=LTERM,OCXLIST(""B"",LTERM,IEN)=""""")
D IN(" ;")
;
I (OCXTRACE) D
.D IN(" I $G(OCXTRACE) S IEN=0 F S IEN=$O(OCXLIST(IEN)) Q:'IEN D")
.D IN(" .W:$G(OCXTRACE) !,?35,"" OCXLIST: "",$J(IEN,7),"" = "",OCXLIST(IEN)")
.D IN(" W:$G(OCXTRACE) !,||LNTAG||,?30,""TERM RESULT: (FILE: "",+$G(FILE),"") "",$G(COUNT),"" Local term(s) found.""")
.D IN(" ;")
;
D IN(" Q FILE")
D IN(" ;")
;
D IN(" ;TERM DATA;")
S OCXD0=0 F S OCXD0=$O(^OCXS(860.9,OCXD0)) Q:'OCXD0 D
.K OCXREC M OCXREC=^OCXS(860.9,OCXD0)
.S OCXNAME=$P(OCXREC(0),U,1) Q:'$L(OCXNAME)
.S OCXFILE=$P(OCXREC(0),U,2) Q:'$L(OCXFILE)
.;Q:'$O(OCXREC(1,0))
.S OCXD1=0 F S OCXD1=$O(OCXREC(1,OCXD1)) Q:'OCXD1 D
..N IEN,NAME
..S NAME=$P($G(OCXREC(1,OCXD1,0)),"^",1) Q:'$L(NAME)
..S IEN=$P($G(OCXREC(1,OCXD1,0)),"^",2) Q:'IEN
..D IN(" ;;"_OCXNAME_U_OCXFILE_U_IEN_U_NAME)
D IN(" ;1;")
D IN(" ;")
;
Q
;
IN(CODE) D IN^OCXOCMP4("TERM",CODE,"Y",16000) Q
;
INCLUDE(LINE) ;
S OCXSR($O(OCXSR(" "),-1)+1,0)=LINE
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOCXOCMPU 2270 printed Dec 13, 2024@02:25:06 Page 2
OCXOCMPU ;SLC/RJS,CLA - ORDER CHECK CODE COMPILER (Build Local Term Translator) ;2/02/99 11:33
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
+4 QUIT
+5 ;
TERMLKUP ;
+1 ;
+2 NEW OCXSR,OCXD0,OCXD1,OCXNAME,TEXT,OCXREC,OCXFILE
+3 ;
+4 SET OCXSR=""
+5 DO INCLUDE("TERMLKUP(OCXTERM,OCXLIST) ;")
+6 ;
+7 IF OCXTRACE
Begin DoDot:1
+8 DO INCLUDE(" W:$G(OCXTRACE) !,||LNTAG||,?27,""Compiler Function TERMLKUP(OCXTERM,OCXLIST) Execution trace. """)
+9 DO INCLUDE(" W:$G(OCXTRACE) !,?35,"" OCXTERM: "",$G(OCXTERM)")
+10 DO INCLUDE(" ;")
End DoDot:1
+11 DO INCLUDE(" Q $$||LINE:"_$$LINE^OCXOCMP4("TERM","OCXTERM","OCXLIST")_"||(OCXTERM,.OCXLIST)")
+12 DO INCLUDE(" ;")
+13 ;
+14 KILL ^TMP("OCXCMP",$JOB,"INCLUDE","TERMLKUP")
+15 MERGE ^TMP("OCXCMP",$JOB,"INCLUDE","TERMLKUP")=OCXSR
+16 ;
+17 QUIT
+18 ;
TERM ;
+1 ;
+2 NEW OCXSR,OCXD0,OCXD1,OCXNAME,TEXT,OCXREC,OCXFILE
+3 ;
+4 DO IN(" Q:'$L(OCXTERM) 0")
+5 DO IN(" ;")
+6 ;
+7 DO IN(" N FILE,IEN,LINE,LTERM,NTERM,TEXT S FILE=0 K OCXLIST")
+8 DO IN(" F LINE=1:1:999 S TEXT=$T(TERM+LINE) Q:$P(TEXT,"";"",2) I ($E(TEXT,2,3)="";;"") D")
+9 DO IN(" .S TEXT=$P(TEXT,"";;"",2)")
+10 DO IN(" .S NTERM=$P(TEXT,U,1) Q:'$L(NTERM) Q:'(OCXTERM=NTERM)")
+11 DO IN(" .S FILE=$P(TEXT,U,2),IEN=$P(TEXT,U,3),LTERM=$P(TEXT,U,4)")
+12 DO IN(" .S OCXLIST(IEN)=LTERM,OCXLIST(""B"",LTERM,IEN)=""""")
+13 DO IN(" ;")
+14 ;
+15 IF (OCXTRACE)
Begin DoDot:1
+16 DO IN(" I $G(OCXTRACE) S IEN=0 F S IEN=$O(OCXLIST(IEN)) Q:'IEN D")
+17 DO IN(" .W:$G(OCXTRACE) !,?35,"" OCXLIST: "",$J(IEN,7),"" = "",OCXLIST(IEN)")
+18 DO IN(" W:$G(OCXTRACE) !,||LNTAG||,?30,""TERM RESULT: (FILE: "",+$G(FILE),"") "",$G(COUNT),"" Local term(s) found.""")
+19 DO IN(" ;")
End DoDot:1
+20 ;
+21 DO IN(" Q FILE")
+22 DO IN(" ;")
+23 ;
+24 DO IN(" ;TERM DATA;")
+25 SET OCXD0=0
FOR
SET OCXD0=$ORDER(^OCXS(860.9,OCXD0))
if 'OCXD0
QUIT
Begin DoDot:1
+26 KILL OCXREC
MERGE OCXREC=^OCXS(860.9,OCXD0)
+27 SET OCXNAME=$PIECE(OCXREC(0),U,1)
if '$LENGTH(OCXNAME)
QUIT
+28 SET OCXFILE=$PIECE(OCXREC(0),U,2)
if '$LENGTH(OCXFILE)
QUIT
+29 ;Q:'$O(OCXREC(1,0))
+30 SET OCXD1=0
FOR
SET OCXD1=$ORDER(OCXREC(1,OCXD1))
if 'OCXD1
QUIT
Begin DoDot:2
+31 NEW IEN,NAME
+32 SET NAME=$PIECE($GET(OCXREC(1,OCXD1,0)),"^",1)
if '$LENGTH(NAME)
QUIT
+33 SET IEN=$PIECE($GET(OCXREC(1,OCXD1,0)),"^",2)
if 'IEN
QUIT
+34 DO IN(" ;;"_OCXNAME_U_OCXFILE_U_IEN_U_NAME)
End DoDot:2
End DoDot:1
+35 DO IN(" ;1;")
+36 DO IN(" ;")
+37 ;
+38 QUIT
+39 ;
IN(CODE) DO IN^OCXOCMP4("TERM",CODE,"Y",16000)
QUIT
+1 ;
INCLUDE(LINE) ;
+1 SET OCXSR($ORDER(OCXSR(" "),-1)+1,0)=LINE
+2 QUIT
+3 ;