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

XPDANLYZ3.m

Go to the documentation of this file.
XPDANLYZ3 ;OAK/RSF- BUILD ANALYZER ;10/28/22
 ;;8.0;KERNEL;**782**;Jul 10, 1995;Build 4
 ;;Per VHA Directive 2004-038, this routine should not be modified.
 ;
OPT ;CONSIDER REMOVING
 W @IOF,"Select product to perform a basic review of components.",!
 N DIRUT K DIR S DIR(0)="S^1:File Analysis;2:Option Analysis;3:Remote Procedure Call (RPC) Analysis;4:KIDS Build"
 S DIR("?")="Select the type of product you want analyze"
 S DIR("A")="Select product to analyze" D ^DIR I $D(DIRUT) G Q1
 N XPDOPT S XPDOPT=Y
 D START^XPDANLYZ1(XPDOPT)
Q1 Q
 ;
RTE1 ;ADD FIRST/SECOND ROUTINE LINES TO DISPLAY
 N XPDNN S XPDNN=$O(XPDARR("BUILD",0))
 Q:'$D(XPDARR("BUILD",XPDNN,"ROUTINE"))
 S XPDCNT=XPDCNT+1,XPDW(XPDCNT)=$TR($J("-",79)," ","-"),XPDCNT=XPDCNT+1,XPDW(XPDCNT)="",XPDCNT=XPDCNT+1,XPDW(XPDCNT)="ROUTINES",XPDHR(XPDCNT)="Routine information"
 S XPDCNT=XPDCNT+1,XPDW(XPDCNT)="",XPDCNT=XPDCNT+1,XPDW(XPDCNT)="Routines can be analyzed using ^XINDEX. This section displays"
 S XPDCNT=XPDCNT+1,XPDW(XPDCNT)="first two lines of routines so they can be validated."
 S XPDCNT=XPDCNT+1,XPDW(XPDCNT)="The third line will be included if it begins with a "";"""
 S XPDCNT=XPDCNT+1,XPDW(XPDCNT)="It also lists the date ^XINDEX was last run."
 S XPDCNT=XPDCNT+1,XPDW(XPDCNT)="",XPDCNT=XPDCNT+1,XPDW(XPDCNT)="Routine information:"
 N XPD99 S XPD99=0 F  S XPD99=$O(XPDARR("BUILD",XPDNN,"ROUTINE",XPD99)) Q:'XPD99  D
 . S XPDCNT=XPDCNT+1,XPDW(XPDCNT)="" N XPDSP1 S XPDSP1=" "
 . N XPDKK S XPDKK=0 F  S XPDKK=$O(XPDARR("BUILD",XPDNN,"ROUTINE",XPD99,XPDKK)) Q:'XPDKK  S:XPDKK>3 XPDSP1=$J(" ",5) S XPDCNT=XPDCNT+1,XPDW(XPDCNT)=XPDSP1_XPDARR("BUILD",XPDNN,"ROUTINE",XPD99,XPDKK)
 N XPDNN S XPDNN=0 F  S XPDNN=$O(XPDARR("REMOTE PROCEDURE",XPDNN)) Q:'XPDNN  D
 . Q:'$D(XPDARR("REMOTE PROCEDURE",XPDNN,"LINE"))
 . N XPD99 S XPD99=0 F  S XPD99=$O(XPDARR("REMOTE PROCEDURE",XPDNN,"LINE",XPD99)) Q:'XPD99  D
 . S XPDCNT=XPDCNT+1,XPDW(XPDCNT)="",XPDCNT=XPDCNT+1,XPDW(XPDCNT)=XPDARR("REMOTE PROCEDURE",XPDNN,"LINE",XPD99)
 Q 
 ;
NSST(XPDX1) ;set up components into XPDARR build
 N XPDCARR,XPDNOM S XPDNOM=XPDCAR(XPDX1,0)
 S XPDARR("BUILD",XPDBIEN,XPDNOM,0)=""
 N XPDCIEN,XPDNAM1
 N RSF S RSF=0 F  S RSF=$O(XPDCAR(XPDX1,RSF)) Q:'RSF  S XPDNAM1=XPDCAR(XPDX1,RSF) Q:XPDNAM1']""  D
 . I XPDNAM1["  FILE" S XPDNAM1=$$TRIM^XLFSTR($P(XPDNAM1,"FILE"),"R"," ")
 . I XPDNOM="APPLICATION ACTION" S XPDCIEN=$O(^DIAC(1.61,"B",XPDNAM1,0))
 . I XPDNOM="OPTION" S XPDCIEN=$O(^DIC(19,"B",XPDNAM1,0))
 . I XPDNOM="REMOTE PROCEDURE" S XPDCIEN=$O(^XWB(8994,"B",XPDNAM1,0))
 . I XPDNOM="BULLETIN" S XPDCIEN=$O(^XMB(3.6,"B",XPDNAM1,0))
 . I XPDNOM="MAIL GROUP" S XPDCIEN=$O(^XMB(3.8,"B",XPDNAM1,0))
 . I XPDNOM="SECURITY KEY" S XPDCIEN=$O(^DIC(19.1,"B",XPDNAM1,0))
 . I XPDNOM="DIALOG" S XPDCIEN=$O(^DI(.84,"B",XPDNAM1,0))
 . I XPDNOM="ENTITY" S XPDCIEN=$O(^DDE("B",XPDNAM1,0))
 . I XPDNOM="FUNCTION" S XPDCIEN=$O(^DD("FUNC","B",XPDNAM1,0))
 . I XPDNOM="FORM" S XPDCIEN=$O(^DIST(.403,"B",XPDNAM1,0))
 . I XPDNOM="HELP FRAME" S XPDCIEN=$O(^DIC(9.2,"B",XPDNAM1,0))
 . I XPDNOM="HL7 APPLICATION PARAMETER" S XPDCIEN=$O(^HL(771,"B",XPDNAM1,0))
 . I XPDNOM="HLO APPLICATION REGISTRY" S XPDCIEN=$O(^HLD(779.2,"B",XPDNAM1,0))
 . I XPDNOM="HL LOGICAL LINK" S XPDCIEN=$O(^HLCS(870,"B",XPDNAM1,0))
 . I XPDNOM="INPUT TEMPLATE" S XPDCIEN=$O(^DIE("B",XPDNAM1,0))
 . I XPDNOM="LIST TEMPLATE" S XPDCIEN=$O(^SD(409.61,"B",XPDNAM1,0))
 . I XPDNOM="PARAMETER DEFINITION" S XPDCIEN=$O(^XTV(8989.51,"B",XPDNAM1,0))
 . I XPDNOM="PARAMETER TEMPLATE" S XPDCIEN=$O(^XTV(8989.52,"B",XPDNAM1,0))
 . I XPDNOM="POLICY" S XPDCIEN=$O(^DIAC(1.6,"B",XPDNAM1,0))
 . I XPDNOM="POLICY FUNCTION" S XPDCIEN=$O(^DIAC(1.62,"B",XPDNAM1,0))
 . I XPDNOM="PRINT TEMPLATE" S XPDCIEN=$O(^DIPT("B",XPDNAM1,0))
 . I XPDNOM="PROTOCOL" S XPDCIEN=$O(^ORD(101,"B",XPDNAM1,0))
 . I XPDNOM="SORT TEMPLATE" S XPDCIEN=$O(^DIBT("B",XPDNAM1,0))
 . I XPDNOM="XULM LOCK DICTIONARY" S XPDCIEN=$O(^XLM(8993,"B",XPDNAM1,0))
 . S XPDARR("BUILD",XPDBIEN,XPDNOM,RSF)=XPDNAM1
 . Q:XPDNOM="ROUTINE"  ;DEALT WITH DIFFERENTLY: RLINES)
 . I XPDCIEN D
 .. S XPDCARR(XPDCIEN)=XPDNAM1 S:XPDNAM1'=$$UP^XLFSTR(XPDNAM1) XPDARR(XPDNOM,XPDCIEN,"WARNING","1"_XPDNAM1)="NAME (#.01) should be UPPERCASE."   ;XPDNAM1_" must be uppercase."
 .. I XPDNOM'="DIALOG",'$$NSPACE^XPDANLYZ6(XPDNAM1) S XPDARR(XPDNOM,XPDCIEN,"WARNING","2"_XPDNAM1)="The "_XPDNOM_" name might be incorrectly namespaced."
 .. ;I XPDNOM'="DIALOG",$E(XPDNAM1,1,$L(XPDSPC))'=XPDSPC S XPDARR(XPDNOM,XPDCIEN,"WARNING","2"_XPDNAM1)="The "_XPDNOM_" name might be incorrectly namespaced."
 I $D(XPDCARR) D
 . I XPDNOM="OPTION" D OCHK^XPDANLYZ2(.XPDCARR) D CEE(.XPDCARR) Q
 . I XPDNOM="REMOTE PROCEDURE"  D RPC2^XPDANLYZ2(.XPDCARR) Q  ;,RPCARR(.XPDCARR) Q
 . I XPDNOM="BULLETIN"  D BULL^XPDANLYZ3(.XPDCARR) Q
 . I XPDNOM="DIALOG"  D DIA^XPDANLYZ3(.XPDCARR) Q
 . I XPDNOM="HELP FRAME"  D SKEY^XPDANLYZ3(.XPDCARR,XPDNOM,XPDX1,"TEXT") Q
 . I XPDNOM["TEMPLATE" D TROU(.XPDCARR,XPDNOM,XPDX1)  ;ARRAY OF NAMES,TYPE,FILE #
 . ;REST BELOW WILL ALL HAVE BASIC DESCRIPTION AND CHECKS. FOR SPECIFICS, NEEDS TO BE BROKEN OUT
 . D SKEY^XPDANLYZ3(.XPDCARR,XPDNOM,XPDX1,"DESCRIPTION") ;NAME ARRAY, COMPONENT NAME, COMPONENT FILE NUMBER
 Q
 ;
TROU(XPDTMPT,XPDCX,ZZ) ;TEMPLATE ARRAY OF NAMES
 Q:'$D(XPDTMPT)  Q:'ZZ  ;W !,">>",XPDCX,! ZW XPDTMPT
 N JJ,XPDIENS S JJ=0 F  S JJ=$O(XPDTMPT(JJ)) Q:'JJ  D
 . S XPDARR(XPDCX,JJ,"NAME")=XPDTMPT(JJ)
 . N TARR S XPDIENS=JJ_"," D GETS^DIQ(ZZ,XPDIENS,"*","DESCRIPTION;ROUTINE INVOKED","TARR")
 . I '$D(TARR) S XPDARR(XPDCX,JJ,"DESCRIPT")="No",XPDARR(ZZ,JJ,"WARNING","DESCRIPTION")="DESCRIPTION missing."
 . I $D(TARR) D
 .. I '$D(TARR(ZZ,XPDIENS,"DESCRIPTION")) S XPDARR(XPDCX,JJ,"DESCRIPT")="No",XPDARR(XPDCX,JJ,"WARNING","DESCRIPTION")="DESCRIPTION missing."
 .. I $D(TARR(ZZ,XPDIENS,"DESCRIPTION")) S XPDARR(XPDCX,JJ,"DESCRIPT")="Yes" N LL S LL=0 F  S LL=$O(TARR(ZZ,XPDIENS,"DESCRIPTION",LL)) Q:'LL  S XPDARR(XPDCX,JJ,"DESCRIPTION",LL)=TARR(ZZ,XPDIENS,"DESCRIPTION",LL)
 .. I $D(TARR(ZZ,XPDIENS,"ROUTINE INVOKED")) N RR S RR=$P(TARR(ZZ,XPDIENS,"ROUTINE INVOKED"),"^",2),XPDARR(XPDCX,JJ,"ROUTINE",RR)="ROUTINE INVOKED field (#1815): Calls "_RR
 Q
BULL(XPDBULL) ;Bulletin Description 
 Q:'$D(XPDBULL)
 N JJ,XPDIENS S JJ=0 F  S JJ=$O(XPDBULL(JJ)) Q:'JJ  D
 . S XPDARR("BULLETIN",JJ,"NAME")=XPDBULL(JJ)
 . N TARR S XPDIENS=JJ_"," D GETS^DIQ(3.6,XPDIENS,"DESCRIPTION","NR","TARR")
 . I '$D(TARR) S XPDARR("BULLETIN",JJ,"DESCRIPT")="No",XPDARR("BULLETIN",JJ,"WARNING","DESCRIPTION")="DESCRIPTION field (#6) missing."
 . I $D(TARR) D
 .. I '$D(TARR(3.6,XPDIENS,"DESCRIPTION")) S XPDARR("BULLETIN",JJ,"DESCRIPT")="No",XPDARR("BULLETIN",JJ,"WARNING","DESCRIPTION")="DESCRIPTION field (#6) missing."
 .. I $D(TARR(3.6,XPDIENS,"DESCRIPTION")) S XPDARR("BULLETIN",JJ,"DESCRIPT")="Yes" N LL S LL=0 F  S LL=$O(TARR(3.6,XPDIENS,"DESCRIPTION",LL)) Q:'LL  S XPDARR("BULLETIN",JJ,"DESCRIPTION",LL)=TARR(3.6,XPDIENS,"DESCRIPTION",LL)
 . ;MAIL GROUP
 . N XPDMG S XPDMG=$$GET1^DIQ(3.62,"1,"_XPDIENS_",",.01)
 . I $G(XPDMG)']"" S XPDARR("BULLETIN",JJ,"WARNING","MAILGROUP")="MAIL GROUP field (#4) missing."
 . E  S XPDARR("BULLETIN",JJ,"MAILGROUP")=XPDBULL(JJ)_"("_JJ_") - MAIL GROUP: "_XPDMG
 Q
CEE(XPDOPTEE) ;CHECK OPTIONS ENTRY/EXIT FOR FILES AND ROUTINES
 Q:'$D(XPDOPTEE)
 N XPDFILE,XPDTST,XPDON D FILES
 N JJJ S JJJ=0 F  S JJJ=$O(XPDOPTEE(JJJ)) Q:'JJJ  S XPDON=$$GET1^DIQ(19,JJJ,.01) D
 . N ENT,EXT,TRARR S ENT=$$GET1^DIQ(19,JJJ,20),EXT=$$GET1^DIQ(19,JJJ,15) ;gets Entry and Exit text from option
 . F XPDTST=ENT,EXT D
 .. N XPLOC S XPLOC=$S(XPDTST=ENT:"ENTRY ACTION field (#20):",XPDTST=EXT:"EXIT ACTION field (#15):",1:"Entry/Exit field:")
 .. N XPEE S XPEE=$S(XPDTST=ENT:"ENT",XPDTST=EXT:"EXT",1:"EE")
 .. Q:XPDTST'["^"
 .. I XPDTST["$D(^" D
 ... N XPD7,JK,TTT S XPD7=$L(XPDTST,"$D(") F JK=2:1:XPD7 S TTT=$P($P($P(XPDTST,"$D(",JK),")"),",") I TTT]"" D
 .... I $P(TTT,"(",2)'?.NP,$L($P(TTT,"("))>1 S XPOPT(JJJ,XPEE,TTT)=XPLOC_" References the global "_TTT_".",TRARR(TTT)=" " Q
 .... S:$L($P(TTT,"(",2))>1 TTT=TTT_"," I $D(XPDFILE(TTT)) S XPOPT(JJJ,XPEE,$P(@(TTT_"0)"),"^"))=XPLOC_" Calls file: "_$P(@(TTT_"0)"),"^")_".",TRARR(TTT)=" " Q
 .. I $D(TRARR) S XPDTST=$$REPLACE^XLFSTR(XPDTST,.TRARR)
 .. N XPD1,TMP1,TMP  S XPD1=$L(XPDTST,"^") F LL=2:1:XPD1 S TMP1=$P($P(XPDTST,"^",LL)," ") D
 ... Q:TMP1["TMP(" 
 ... N XPDF S XPDF="^"_$P(TMP1,",")_"," S:$L($P(XPDF,"(",2))<2 XPDF=$$TRIM^XLFSTR(XPDF,"R",",")
 ... I $D(XPDFILE(XPDF)) S XPOPT(JJJ,XPEE,$P(@(XPDF_"0)"),"^"))=XPLOC_" Calls file: "_$P(@(XPDF_"0)"),"^")_"." Q  ;CHECK FOR FILES
 ... N XPDME S XPDME=0 I TMP1["(",XPDTST'?.E1(1."D ",1."X ",1."K ",1."G ").E1."^".E S XPDME=1
 ... N JKL,JS S JS=1,TMP="" I $E(TMP1,1)="%" S TMP="%",JS=2
 ... F JKL=JS:1:$L(TMP1) Q:'($E(TMP1,JKL)?1(1A,1N).E)  S TMP=TMP_$E(TMP1,JKL)  ;W ">> ",TMP," "
 ... I TMP]"",$L(TMP)>1 D
 .... I XPDME S XPOPT(JJJ,XPEE,TMP)=XPLOC_" Calls file: "_TMP_"." Q
 .... S XPOPT(JJJ,XPEE,TMP)=XPLOC
 Q
FILES ;GET ALL FILE GLOBALS
 S LL=0 F  S LL=$O(^DIC(LL)) Q:'LL  N XPD1 S XPD1=$$GET1^DIQ(1,LL,1) S:XPD1]"" XPDFILE(XPD1)=""
 Q
 ;
MG1(XPDMARR) ;GET MAIL GROUP DESCRIPTION
 Q:'$D(XPDMARR)
 N JJ,XPDIENS S JJ=0 F  S JJ=$O(XPDMARR(JJ)) Q:'JJ  D
 . S XPDARR("MAIL GROUP",JJ,"NAME")=XPDMARR(JJ)
 . N TARR S XPDIENS=JJ_"," D GETS^DIQ(3.8,XPDIENS,"DESCRIPTION","NR","TARR")
 . I '$D(TARR) S XPDARR("MAIL GROUP",JJ,"DESCRIPT")="No",XPDARR("MAIL GROUP",JJ,"WARNING","DESCRIPTION")="MAIL GROUP "_XPDMARR(JJ)_"("_JJ_") - DESCRIPTION field (#3) missing."
 . I $D(TARR) D
 .. I '$D(TARR(3.8,XPDIENS,"DESCRIPTION")) S XPDARR("MAIL GROUP",JJ,"DESCRIPT")="No",XPDARR("MAIL GROUP",JJ,"WARNING","DESCRIPTION")="MAIL GROUP "_XPDMARR(JJ)_"("_JJ_") - DESCRIPTION field (#3) missing."
 .. I $D(TARR(3.8,XPDIENS,"DESCRIPTION")) S XPDARR("MAIL GROUP",JJ,"DESCRIPT")="Yes" N LL S LL=0 F  S LL=$O(TARR(3.8,XPDIENS,"DESCRIPTION",LL)) Q:'LL  S XPDARR("MAIL GROUP",JJ,"DESCRIPTION",LL)=TARR(3.8,XPDIENS,"DESCRIPTION",LL)
 Q
DIA(XPDIA) ;DIALOG CHECK
 Q:'$D(XPDIA)
 N JJ,XPDIENS S JJ=0 F  S JJ=$O(XPDIA(JJ)) Q:'JJ  D
 . S XPDARR("DIALOG",JJ,"NAME")=XPDIA(JJ)
 . N TARR S XPDIENS=JJ_"," D GETS^DIQ(.84,XPDIENS,"**","NR","TARR")
 . I '$D(TARR) S XPDARR("DIALOG",JJ,"DESCRIPT")="No",XPDARR("DIALOG",JJ,"WARNING","DESCRIPTION")="DIALOG "_XPDIA(JJ)_"("_JJ_") - TEXT field (#4) missing."
 . I $D(TARR) D
 .. I '$D(TARR(.84,XPDIENS,"TEXT")) S XPDARR("DIALOG",JJ,"DESCRIPT")="No",XPDARR("DIALOG",JJ,"WARNING","DESCRIPTION")="DIALOG "_XPDIA(JJ)_"("_JJ_") - TEXT field (#4) missing."
 .. I $D(TARR(.84,XPDIENS,"TEXT")) S XPDARR("DIALOG",JJ,"DESCRIPT")="Yes" N LL S LL=0 F  S LL=$O(TARR(.84,XPDIENS,"TEXT",LL)) Q:'LL  S XPDARR("DIALOG",JJ,"DESCRIPTION",LL)=TARR(.84,XPDIENS,"TEXT",LL)
 .. I $D(TARR(.84,XPDIENS,"PACKAGE")),$D(XPDN) S:TARR(.84,XPDIENS,"PACKAGE")'=XPDN XPDARR("DIALOG",JJ,"WARNING","1NMSP")="PACKAGE field (#1.2) entry "_TARR(.84,XPDIENS,"PACKAGE")_" is not the build namespace."
 .. I $D(TARR(.841)) N XIEN S XIEN=" " F  S XIEN=$O(TARR(.841,XIEN)) Q:XIEN']""  D
 ... N DRTN S DRTN=TARR(.841,XIEN,"ROUTINE NAME"),XPDARR("DIALOG",JJ,"ROUTINE",DRTN)="ROUTINE NAME (subfield #.01) within the CALLED FROM ENTRY POINTS sub-file (#8) calls "_DRTN_" not found in build."
 ... ;I $E(DRTN,1,$L(XPDSPC))'=XPDSPC S XPDARR("DIALOG",JJ,"WARNING",DRTN_"Z")="ROUTINE NAME (subfield #.01) within the CALLED FROM ENTRY POINTS sub-file (#8) calls "_DRTN_" not in the patch namespace."
 Q
SKEY(XPDGC,XPDCX,XPDXN,DES) ;GENERIC COMPONENT INFO RECEIVING: NAME ARRAY, COMPONENT NAME, COMPONENT FILE NUMBER, DES=DESCRIPTION OR TEXT
 Q:'$D(XPDGC)  Q:XPDCX']""
 N JJ,XPDIENS S JJ=0 F  S JJ=$O(XPDGC(JJ)) Q:'JJ  D
 . S XPDARR(XPDCX,JJ,"NAME")=XPDGC(JJ)
 . N TARR S XPDIENS=JJ_"," D GETS^DIQ(XPDXN,XPDIENS,DES,"NR","TARR")
 . I '$D(TARR) S XPDARR(XPDCX,JJ,"DESCRIPT")="No",XPDARR(XPDCX,JJ,"WARNING","DESCRIPTION")=DES_" missing."
 . I $D(TARR) D
 .. I '$D(TARR(XPDXN,XPDIENS,DES)) S XPDARR(XPDCX,JJ,"DESCRIPT")="No",XPDARR(XPDCX,JJ,"WARNING","DESCRIPTION")=DES_" missing."
 .. I $D(TARR(XPDXN,XPDIENS,DES)) S XPDARR(XPDCX,JJ,"DESCRIPT")="Yes" N LL S LL=0 F  S LL=$O(TARR(XPDXN,XPDIENS,DES,LL)) Q:'LL  S XPDARR(XPDCX,JJ,"DESCRIPTION",LL)=TARR(XPDXN,XPDIENS,DES,LL)
 Q
 ;
PDESC ;
 W !!,$TR($J("-",79)," ","-"),!!
 N DIRUT K DIR S DIR(0)="Y",DIR("B")="YES"
 S DIR("A",2)="them into a spell check program, would you like to print them",DIR("A",1)="To review component descriptions and make it easier to copy/paste",DIR("?")="Print descriptions in one place?"
 S DIR("A")="at the end of the analysis"
 D ^DIR G:$D(DTOUT) X1^XPDANLYZ1 G:$D(DIRUT) X1^XPDANLYZ1
 I Y D PRNTME("DESCRIPTION")
 Q
PRNTME(PTRM) ;
 Q:'$D(PTRM)
 W @IOF
 N XPDTYP
 I XPDRC=1 S XPDTYP="FILE" W "File Descriptions:"
 I XPDRC=2 S XPDTYP="OPTION" W "Option Descriptions:"
 I XPDRC=3 S XPDTYP="REMOTE PROCEDURE" W "Remote Procedure Call Descriptions:"
 ;I XPDRC=4 W "Descriptions associated with this build:" N II F II=1:1:CLEN S XPDTYP=$P(XPDCHK,",",II) D PM1
PM1 N TT S TT=0 F  S TT=$O(XPDARR(XPDTYP,TT)) Q:'TT  D
 . ;I XPDTYP="BUILD" D FMSG^XPDANLYZ2(XPDARR(XPDTYP,TT,"NAME"))  ;this looks for Forum msg and prints description for spell checking
 . W !!,XPDTYP_": ",XPDARR(XPDTYP,TT,"NAME")  ;," (#",TT,")"
 . I PTRM="DESCRIPTION",XPDARR(XPDTYP,TT,"DESCRIPT")="No" W !,XPDTYP_" missing." Q
 . N QQ S QQ=0 F  S QQ=$O(XPDARR(XPDTYP,TT,PTRM,QQ)) Q:'QQ  W !,XPDARR(XPDTYP,TT,PTRM,QQ)
 . I $D(XPDARR("FILE",TT,"FIELD DESCRIPTIONS")) D
 .. N UU,PP S (PP,UU)=0 F  S UU=$O(XPDARR(XPDTYP,TT,UU)) Q:'UU  F  S PP=$O(XPDARR(XPDTYP,TT,UU,"DESCRIPTION",PP)) Q:'PP  W !,XPDARR(XPDTYP,TT,UU,"DESCRIPTION",PP)
 ;I XPDRC=4 D PR1 Q
 Q
MMT ;SET SPELL CHECK ARRAY
 N XCNT S XCNT=0,XCNT=XCNT+1,XPDMM(XCNT)="Descriptions and other text associated with this build (for review and"
 S XCNT=XCNT+1,XPDMM(XCNT)="spell check):" N II F II=1:1:CLEN S XPDTYP=$P(XPDCHK,",",II) D
 . N TT S TT=0 F  S TT=$O(XPDARR(XPDTYP,TT)) Q:'TT  D
 .. ;I XPDTYP="BUILD" D FMSG^XPDANLYZ2(XPDARR(XPDTYP,TT,"NAME"))  ;this looks for Forum msg and prints description for spell checking
 .. S XCNT=XCNT+1,XPDMM(XCNT)="",XCNT=XCNT+1,XPDMM(XCNT)="",XCNT=XCNT+1,XPDMM(XCNT)=XPDTYP_": "_XPDARR(XPDTYP,TT,"NAME")  ;," (#",TT,")"
 .. I XPDARR(XPDTYP,TT,"DESCRIPT")="No" S XCNT=XCNT+1,XPDMM(XCNT)=$J(" ",5)_"* Description missing." Q
 .. N QQ S QQ=0 F  S QQ=$O(XPDARR(XPDTYP,TT,"DESCRIPTION",QQ)) Q:'QQ  S XCNT=XCNT+1,XPDMM(XCNT)=XPDARR(XPDTYP,TT,"DESCRIPTION",QQ)
 .. I $D(XPDARR("FILE",TT,"FIELD")) S XCNT=XCNT+1,XPDMM(XCNT)="" D
 ... N UU,PP,YY S (UU,PP)=" ",YY=-1 F  S UU=$O(XPDARR("FILE",TT,"FIELD",UU)) Q:UU']""  S XCNT=XCNT+1,XPDMM(XCNT)="" D
 .... F  S PP=$O(XPDARR("FILE",TT,"FIELD",UU,PP)) Q:PP']""  S XCNT=XCNT+1 F  S YY=$O(XPDARR("FILE",TT,"FIELD",UU,PP,YY)) Q:YY']""  S XCNT=XCNT+1,XPDMM(XCNT)=XPDARR("FILE",TT,"FIELD",UU,PP,YY)
 .. I $D(XPDARR("FILE",TT,"FIELD DESCRIPTIONS")) D
 ... N UU,PP S (PP,UU)=0 F  S UU=$O(XPDARR(XPDTYP,TT,UU)) Q:'UU  F  S PP=$O(XPDARR(XPDTYP,TT,UU,"DESCRIPTION",PP)) Q:'PP  S XCNT=XCNT+1,XPDMM(XCNT)=XPDARR(XPDTYP,TT,UU,"DESCRIPTION",PP)
 I '$D(XPRSPL) S XCNT=XCNT+1,XPDMM(XCNT)="",XCNT=XCNT+1,XPDMM(XCNT)="***  No routine issues noted.  ***" Q
 S XCNT=XCNT+1,XPDMM(XCNT)="",XCNT=XCNT+1,XPDMM(XCNT)=$TR($J("=",79)," ","=")
 S XCNT=XCNT+1,XPDMM(XCNT)="",XCNT=XCNT+1,XPDMM(XCNT)="Text in ROUTINES between quotes and/or after ;;, by line number:"
 N RNME,ONME,CNT S (RNME,ONME)=" ",CNT=0 F  S RNME=$O(XPRSPL(RNME)) Q:RNME']""  F  S CNT=$O(XPRSPL(RNME,CNT)) Q:'CNT  D
 . I RNME'=ONME S ONME=RNME S XCNT=XCNT+1,XPDMM(XCNT)="",XCNT=XCNT+1,XPDMM(XCNT)="",XCNT=XCNT+1,XPDMM(XCNT)=RNME
 . S XCNT=XCNT+1,XPDMM(XCNT)=XPRSPL(RNME,CNT)
 Q
 ;
 ;BCHK(XPDR) ;CALLED FROM RLINES^XPDANLYZ2     <-- removed as resource intensive and probably not needed.  It checked  if routine was in patches not listed on line 2
 ;N QWE S QWE=0 F  S QWE=$O(^XPD(9.6,QWE)) Q:'QWE  N XPD1 S XPD1="" F  S XPD1=$O(^XPD(9.6,QWE,"KRN",9.8,"NM","B",XPD1)) Q:$G(XPD1)']""  D
 ;. I XPD1=XPDR,$$GET1^DIQ(9.6,QWE_",",.02)]"" D
 ;.. N PNUM S PNUM=$$GET1^DIQ(9.6,QWE_",",.01) I X2'[(","_$P(PNUM,"*",3)_",") S:$D(BROU(XPDR)) BROU(XPDR)=BROU(XPDR)_", "_PNUM S:'$D(BROU(XPDR)) BROU(XPDR)="     "_PNUM
 ;Q 
CUT ;CALLED FROM RLINES^XPDANLYZ2
 N WMSG,ZZ,CC,ET S ET=0 S WMSG=XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)
C1 N I F I=71,72,73,74 S CC=$E(WMSG,I) I ", "[CC D  Q:ET=1
 . S XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)=$E(WMSG,1,I),WMSG=$J(" ",20)_$$TRIM^XLFSTR($E(WMSG,(I+1),9999),"L"," ")
 . S XPCNT=XPCNT+1
 . I $L(WMSG)<74 S XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)=WMSG,ET=1 Q
 . E  S ET=0 Q
 I $L(WMSG)>73 D C1
 Q
FADJ(SME,FTXT) ;CALLED FROM PME^XPDANLYZ1
 I +$G(SME) S XPDCNT=XPDCNT+1,XPDW(XPDCNT)=" "
 I FTXT]"" S XPDCNT=XPDCNT+1,XPDW(XPDCNT)=$J(" ",5)_FTXT
 Q