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

XPDANLYZ2.m

Go to the documentation of this file.
  1. XPDANLYZ2 ;OAK/RSF- BUILD ANALYZER ;10/28/22
  1. ;;8.0;KERNEL;**782,792**;Jul 10, 1995;Build 4
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. XREF ;XREF
  1. Q:'FXX
  1. S XPDARR("FILE",FXX,"XREF")="No"
  1. I $D(^DD(FXX,0,"IX")) D
  1. . S XPDARR("FILE",FXX,"XREF")="Yes"
  1. . N JJ,LL,MM,RSF S JJ="",(LL,MM)=0 F S JJ=$O(^DD(FXX,0,"IX",JJ)) Q:$G(JJ)']"" F S LL=$O(^DD(FXX,0,"IX",JJ,LL)) Q:'$G(LL) D
  1. .. F S MM=$O(^DD(FXX,0,"IX",JJ,LL,MM)) Q:'$G(MM) D
  1. ... Q:(JJ="B") ;&(MM=.01)
  1. ... N PP S PP=0,RSF="field" F S PP=$O(^DD(LL,MM,1,PP)) Q:'PP S:LL'=FXX RSF="subfield " D
  1. .... I JJ=$P(^DD(LL,MM,1,PP,0),"^",2),'$D(^DD(LL,MM,1,PP,"%D")) S XPDARR("FILE",FXX,MM,"WARNING","XREF")=$P(^DD(LL,MM,1,PP,0),"^",2)_" cross-reference ("_RSF_" #"_MM_") - DESCRIPTION missing."
  1. Q
  1. ;
  1. ;OPTION
  1. OPTME ;Option Analysis called from START^XPDANLYZ1
  1. N XPDOARR,KK S KK=0 ;XPDRC=2 IS OPTION
  1. N DIRUT,Y K DIR S DIR(0)="YO",DIR("A")="Do you want to analyze all options for a namespace"
  1. S DIR("?")="Will use a range of options whose name starts with a series of letters - usually the namespace (i.e. TIU)"
  1. D ^DIR I $D(DIRUT) S END=1 Q
  1. N XPDY S XPDY=Y
  1. G1 I XPDY=0 W ! D
  1. . N DIC,Y S DIC=19,DIC(0)="QEAM",DIC("A")="Select individual options by name: "
  1. . D ^DIC I Y=-1 K DIC S XPDY=99,END=1 Q
  1. . ;I $D(DUOUT) K DIC Q ;-1 LIKE ABOVE
  1. . I $D(DTOUT) S XPDY=99,END=1 Q
  1. . I $G(Y)]"" S XPDOARR($P(Y,"^"))=$P(Y,"^",2),KK=KK+1 ;OPTION ien ^ NAME
  1. G:XPDY=0 G1
  1. I XPDY=1 N XPDPKG,XPDPKGL D G:END X1^XPDANLYZ1
  1. . W ! N DIRUT K DIR S DIR(0)="FO^2:10",DIR("?")="Enter the Package for the options to include"
  1. . S DIR("A")="Enter the package abbreviation or leading characters of options to include"
  1. . D ^DIR
  1. . I $D(DIRUT) S END=1 Q
  1. . I $G(Y)]"" S XPDPKG=$$UP^XLFSTR(Y),XPDPKGL=$L(XPDPKG) Q:'$G(XPDPKGL) ;** CONFRIM ALL SHOULD BE UPPERCASE
  1. . N JJ S JJ="",KK=0 F S JJ=$O(^DIC(19,"B",JJ)) Q:$G(JJ)']"" I $E(JJ,1,XPDPKGL)=XPDPKG S XPDOARR($O(^DIC(19,"B",JJ,0)))=JJ,KK=KK+1
  1. I $G(KK)>1 D
  1. . W !!,"Will check these ",KK," options:"
  1. . N JJ S JJ=0 F S JJ=$O(XPDOARR(JJ)) Q:'JJ W !,?5,XPDOARR(JJ) I ($Y+5)>IOSL D HDR^XPDANLYZ1("Options (continued): ") Q:END
  1. . W !!,?5,",, WORKING .."
  1. I $D(XPDOARR) D OCHK(.XPDOARR)
  1. Q
  1. OCHK(XPDORR) ;setting up information to check OPTIONS ENTRY/EXIT for files and routines.
  1. N JJ,XPDIENS S JJ=0 F S JJ=$O(XPDORR(JJ)) Q:'JJ D
  1. . N TARR S XPDIENS=JJ_"," D GETS^DIQ(19,XPDIENS,"**","N","TARR") I $D(TARR) D
  1. .. S XPDARR("OPTION",JJ,"NAME")=XPDORR(JJ)
  1. .. I '$D(TARR(19,XPDIENS,3.5)) S XPDARR("OPTION",JJ,"DESCRIPT")="No",XPDARR("OPTION",JJ,"WARNING","DESCRIPTION")="DESCRIPTION field (#3.5) missing."
  1. .. I $D(TARR(19,XPDIENS,3.5)) S XPDARR("OPTION",JJ,"DESCRIPT")="Yes" N LL S LL=0 F S LL=$O(TARR(19,XPDIENS,3.5,LL)) Q:'LL S XPDARR("OPTION",JJ,"DESCRIPTION",LL)=TARR(19,XPDIENS,3.5,LL)
  1. .. I $D(TARR(19,XPDIENS,1)) S XPDARR("OPTION",JJ,"Menu")=TARR(19,XPDIENS,1)
  1. .. I '$D(TARR(19,XPDIENS,1)) S XPDARR("OPTION",JJ,"WARNING","MENU TXT")="MENU TEXT field (#1) missing."
  1. .. I '$D(TARR(19,XPDIENS,12)) S XPDARR("OPTION",JJ,"WARNING","PKG")="PACKAGE field (#12) missing."
  1. .. I $D(TARR(19,XPDIENS,12)) S XPDARR("OPTION",JJ,"PKG")=TARR(19,XPDIENS,12)
  1. .. ; 25 IS ROUTINE AND IS TAG^ROUTINE
  1. .. I $D(TARR(19,XPDIENS,25)) N TT,RR S TT=$L(TARR(19,XPDIENS,25),"^") Q:$G(TT)']"" S RR=$P(TARR(19,XPDIENS,25),"^",TT) S:RR["(" RR=$P(RR,"(") D
  1. ... S XPOPT(JJ,"ROU",RR)="ROUTINE field(#25):"
  1. ... ;S XPDARR("OPTION",JJ,"WARNING",RR)="Calls routine "_RR_" not found in build"
  1. ... ;I $E(RR,1,$L(XPDSPC))'=XPDSPC S XPDARR("OPTION",JJ,"WARNING",RR_"Z")="Calls routine "_RR_" not in patch namespace."
  1. Q:XPDRC=4
  1. S XPDCS("OPTION")=19
  1. OPX K DIC Q
  1. ;
  1. RPCHK ; RPC Analysis called XPDANLYZ1
  1. N XPDCARR,KK S KK=0 ;XPDRC=4 IS RPC
  1. N DIRUT K DIR S DIR(0)="YO",DIR("A")="Do you want to analyze all RPCs for a namespace"
  1. S DIR("?")="Will use a range of RPCs whose name starts with a series of letters - usually the namespace (i.e. TIU)"
  1. D ^DIR I $D(DIRUT) S END=1 Q
  1. N XPDY S XPDY=Y
  1. RPC1 I XPDY=0 W ! D
  1. . N DIC S DIC=8994,DIC(0)="QEAM",DIC("A")="Select individual RPCs by name: "
  1. . D ^DIC I Y=-1 K DIC S XPDY=99 Q
  1. . I $D(DTOUT) S XPDY=99 Q
  1. . I $G(Y)]"" S XPDCARR($P(Y,"^"))=$P(Y,"^",2),KK=KK+1 ;RPC ien ^ NAME
  1. G:XPDY=0 RPC1
  1. I XPDY=1 N XPDPKG,XPDPKGL D G:END X1^XPDANLYZ1
  1. . W ! N DIRUT K DIR S DIR(0)="FO^2:10",DIR("?")="Enter the Package for the RPCs"
  1. . S DIR("A")="Enter the package abbreviation or leading characters of RPCs to include"
  1. . D ^DIR
  1. . I $D(DIRUT) Q
  1. . I $G(Y)]"" S XPDPKG=$$UP^XLFSTR(Y),XPDPKGL=$L(XPDPKG) Q:'$G(XPDPKGL) ;** CONFRIM ALL SHOULD BE UPPERCASE
  1. . N JJ S JJ="",KK=0 F S JJ=$O(^XWB(8994,"B",JJ)) Q:$G(JJ)']"" I $E(JJ,1,XPDPKGL)=XPDPKG S XPDCARR($O(^XWB(8994,"B",JJ,0)))=JJ,KK=KK+1
  1. I $G(KK)>1 D
  1. . W !!,"Will check these ",KK," Remote Procedure Calls"
  1. . N JJ S JJ=0 F S JJ=$O(XPDCARR(JJ)) Q:'JJ W !,?5,XPDCARR(JJ) I ($Y+5)>IOSL D HDR^XPDANLYZ1("RPC (continued): ") Q:END
  1. . W !!,?5,",, WORKING .."
  1. I $D(XPDCARR) D RPC2(.XPDCARR)
  1. Q
  1. RPC2(XPDRPC) ;^XWB(8994,; Remote Procedure check
  1. Q:'$D(XPDRPC)
  1. N JJ,XPDIENS S JJ=0 F S JJ=$O(XPDRPC(JJ)) Q:'JJ D
  1. . N TARR S XPDIENS=JJ_"," D GETS^DIQ(8994,XPDIENS,"**","NR","TARR") I $D(TARR) D
  1. .. S XPDARR("REMOTE PROCEDURE",JJ,"NAME")=XPDRPC(JJ)
  1. .. I '$D(TARR(8994,XPDIENS,"DESCRIPTION")) S XPDARR("REMOTE PROCEDURE",JJ,"DESCRIPT")="No",XPDARR("REMOTE PROCEDURE",JJ,"WARNING","DESCRIPTION")="DESCRIPTION field (#1) missing."
  1. .. I $D(TARR(8994,XPDIENS,"DESCRIPTION")) S XPDARR("REMOTE PROCEDURE",JJ,"DESCRIPT")="Yes" N LL S LL=0 F S LL=$O(TARR(8994,XPDIENS,"DESCRIPTION",LL)) Q:'LL S XPDARR("REMOTE PROCEDURE",JJ,"DESCRIPTION",LL)=TARR(8994,XPDIENS,"DESCRIPTION",LL)
  1. .. ;RETURN PARAMETERS
  1. .. I $D(TARR(8994,XPDIENS,"RETURN VALUE TYPE")),'$D(TARR(8994,XPDIENS,"RETURN PARAMETER DESCRIPTION")) S XPDARR("REMOTE PROCEDURE",JJ,"WARNING","RETURN DESCRIPTION")="RPC RETURN DESCRIPTION field (#3) missing."
  1. .. ;INPUT
  1. .. I $D(^XWB(8994,JJ,2,0)) N XPDIP S XPDIP=$P(^XWB(8994,JJ,2,0),"^",4) Q:$G(XPDIP)<1 D
  1. ... N MM F MM=1:1:XPDIP I '$D(TARR(8994.02,MM_","_XPDIENS,"DESCRIPTION")) N LL D ;p792
  1. .... S LL=MM I '$D(TARR(8994.02,MM_","_XPDIENS)) S LL=$P($O(TARR(8994.02,MM_","_XPDIENS)),",") S:LL="" LL=MM I $D(TARR(8994.02,LL_","_XPDIENS,"DESCRIPTION")) Q
  1. .... S XPDARR("REMOTE PROCEDURE",JJ,"WARNING","INPUT DESCRIPTION")="RPC Input Description for "_$G(TARR(8994.02,LL_","_XPDIENS,"INPUT PARAMETER"))_" missing."
  1. .. I $D(TARR(8994,XPDIENS,"ROUTINE")) N RRR S RRR=TARR(8994,XPDIENS,"ROUTINE") D
  1. ... S XPDARR("REMOTE PROCEDURE",JJ,"ROUTINE",RRR)="Routine field (#.03): Calls "_RRR_" not found in build."
  1. ... ;I $E(RRR,1,$L(XPDSPC))'=XPDSPC S XPDARR("REMOTE PROCEDURE",JJ,"WARNING",RRR_"Z")="Routine field (#.03): Calls "_RRR_" not in patch namespace."
  1. Q:XPDRC=4
  1. S XPDCS("REMOTE PROCEDURE")=8994
  1. RPCX K DIC Q
  1. ;
  1. SQA(RR) ;Sets SQA CL array XPDARRR
  1. S XPDARRR("////",RR,0)=""
  1. S XPDARRR("DIC(0)",RR,0)=""
  1. S XPDARRR("^UTILITY",RR,0)=""
  1. S XPDARRR("^TMP",RR,0)=""
  1. S XPDARRR("^XTMP",RR,0)=""
  1. S XPDARRR("%",RR,0)=""
  1. S XPDARRR("$I",RR,0)=""
  1. S XPDARRR("U=",RR,0)=""
  1. S XPDARRR("K ^",RR,0)=""
  1. S XPDARRR("K:",RR,0)=""
  1. S XPDARRR("K @",RR,0)=""
  1. S XPDARRR("^(",RR,0)=""
  1. S XPDARRR("IO",RR,0)=""
  1. Q
  1. ;
  1. FMSG(XPDBT) ;
  1. N XPDUZ S XPDUZ=$G(DUZ) Q:'$G(DUZ)
  1. K ^TMP("XPDEM",$J)
  1. N XMCRIT S XMCRIT("SUBJ")=XPDBT
  1. D LISTMSGS^XMXAPIB(XPDUZ,"*","SUBJ;DATE;F","B",,,.XMCRIT,"^TMP(""XPDEM"",$J)")
  1. I $D(^TMP("XPDEM",$J)) D
  1. . N JKL,XPDNIEN S JKL=$O(^TMP("XPDEM",$J,"XMLIST",0)) Q:'$G(JKL) S XPDNIEN=^TMP("XPDEM",$J,"XMLIST",JKL)
  1. . ;W !,XPDNIEN
  1. . N XPDMTXT,XPD,XEND S XPD=$$GET1^DIQ(3.9,288988_",",3,"","XPDMTXT"),XEND=0
  1. . Q:'$D(XPDMTXT) Q:'$D(XPDMTXT(.006))
  1. . ; NOT SURE THIS IS CONSISTENT...Q:XPDMTXT(.006)'["FORUM"
  1. . W !!,"Description from FORUM patch:",!
  1. . S JKL=.9 F S JKL=$O(XPDMTXT(JKL)) Q:('$G(JKL))!(+$G(XEND))!(XPDMTXT(JKL)="Packman Mail Message:") D Q:+$G(XEND)
  1. .. I XPDMTXT(JKL)="$END TXT" S XEND=1 Q
  1. .. W !,XPDMTXT(JKL)
  1. Q
  1. ;
  1. COMP1 ;SETS THE COMPONENTS USED BY BUILD PROGRAM From <https://www.domain.ext/vdl/documents/Infrastructure/Kernel/krn8_0dg.docx>
  1. S XPDCS("APPLICATION ACTION")=1.61
  1. S XPDCS("BULLETIN")=3.6
  1. S XPDCS("DIALOG")=.84
  1. S XPDCS("ENTITY")=1.5
  1. S XPDCS("FORM")=.403
  1. S XPDCS("FUNCTION")=.5
  1. S XPDCS("HELP FRAME")=9.2
  1. S XPDCS("HL7 APPLICATION PARAMETER")=771
  1. S XPDCS("HLO APPLICATION REGISTRY")=779.2
  1. S XPDCS("HL LOGICAL LINK")=870
  1. ;S XPDCS("HL LOWER LEVEL PROTOCOL")=""
  1. S XPDCS("INPUT TEMPLATE")=.402
  1. S XPDCS("LIST TEMPLATE")=409.61
  1. S XPDCS("MAIL GROUP")=3.8
  1. S XPDCS("OPTION")=19
  1. S XPDCS("PARAMETER DEFINITION")=8989.51
  1. S XPDCS("PARAMETER TEMPLATE")=8989.52
  1. S XPDCS("POLICY")=1.6
  1. S XPDCS("POLICY FUNCTION")=1.62
  1. S XPDCS("PRINT TEMPLATE")=.4
  1. S XPDCS("PROTOCOL")=101
  1. S XPDCS("REMOTE PROCEDURE")=8994
  1. S XPDCS("ROUTINE")=9.8
  1. S XPDCS("SECURITY KEY")=19.1
  1. S XPDCS("SORT TEMPLATE")=.401
  1. S XPDCS("XULM LOCK DICTIONARY")=8993
  1. Q
  1. ;
  1. RLINES ;CAPTURES ROUTINE INFO; XPDSQA ARRAY OF SQA ROUTINE LINES
  1. N JJ,X,RTN,ROU,DIF,XCNP,XPDARRR,XPDPNUM,PNUM,XPCNT,X2,BROU S XPDPNUM=$P(XPDARR("BUILD",XPDBIEN,"NAME"),"*",3),PNUM="",XPCNT=5,XPTL=0
  1. N TCNT S (JJ,TCNT)=0 F S JJ=$O(XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ)) Q:'JJ S ROU=XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ) D
  1. . S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)=""
  1. . I ROU'=$$UP^XLFSTR(ROU) S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)="* NAME (#.01) must be in UPPERCASE." ;ROU
  1. . D SQA^XPDANLYZ2(JJ) ;SETS SQA CL ARRAY XPDARRR
  1. . D RSPELL(ROU) ;SETS SPELL CHECK ARRAY XPRSPL
  1. . ;I $E(ROU,1,$L(XPDSPC))'=XPDSPC S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)="* "_ROU_" is not in the Package namespace."
  1. . I '$$NSPACE^XPDANLYZ6(ROU) S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)="* "_ROU_" is not in the Package namespace."
  1. . N XRIEN S XRIEN=$O(^DIC(9.8,"B",ROU,0)) Q:'XRIEN D
  1. .. N XPDINX S XPDINX=$$GET1^DIQ(9.8,XRIEN_",",1.4)
  1. .. I XPDINX]"" S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)="* Date of Last ^XINDEX: "_XPDINX
  1. .. I XPDINX']"" S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)="* Date ^XINDEX last run was not found."
  1. . N X S X=ROU X ^%ZOSF("TEST") Q:'$T
  1. . K RTN S XCNP=0,DIF="RTN(" X ^%ZOSF("LOAD")
  1. . N K,SQAC,ZTAG,TCHK S (TCHK,K)=0 F S K=$O(RTN(K)) Q:'K D
  1. .. I $E(RTN(K,0),1)'=" " S ZTAG=$P($P(RTN(K,0)," "),"(")_"^"_K I $L($P(ZTAG,"^"))>XPTL S XPTL=$L($P(ZTAG,"^"))
  1. .. I K=1 S XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,1)=RTN(K,0) Q
  1. .. I K=2 D
  1. ... S XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,2)=RTN(K,0)
  1. ... N QL S PNUM=$P(RTN(K,0),"**",2),X2=","_PNUM_",",QL=$L(PNUM,",") I $P(PNUM,",",QL)'=XPDPNUM S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)="* Missing current patch number on second line."
  1. ... ;D BCHK^XPDANLYZ3(ROU) I $D(BROU(ROU)) D ;RESOURCE INTENSIVE FOR LITTLE USEFUL INFO
  1. ... ;. S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)="* BUILD file also lists this routine in these patches:"
  1. ... ;. S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)=BROU(ROU)
  1. .. I K=3,$E(RTN(K,0),1,6)[";",$L(RTN(K,0))>3,$E(RTN(K,0),1)'?1U S XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,3)=RTN(K,0) ;,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,4)="" Q
  1. .. I K>3,$TR($E(RTN(K,0),1,10)," ",".")?."."1";".E Q ;QUITS IF BEGINS WITH SPACES OR SPACES AND .. FOLLOWED BY ";"
  1. .. N XPD1,EXT S XPD1=" ",EXT=0 F S XPD1=$O(XPDARRR(XPD1)) Q:$G(XPD1)']"" D
  1. ... N TAGME S TAGME=$P(ZTAG,"^")_" +"_(K-$P(ZTAG,"^",2))
  1. ... I XPD1="K:",RTN(K,0)[XPD1 D KCOLON^XPDANLYZ5(RTN(K,0)) Q
  1. ... Q:EXT
  1. ... I XPD1="^XTMP",RTN(K,0)[XPD1 D TMPX^XPDANLYZ5(RTN(K,0)) I 'XPDIS2 Q:TCHK ;TMPX^ZZSRABA
  1. ... I XPD1="^TMP",'XPDIS2,RTN(K,0)[XPD1 D TMP^XPDANLYZ5(RTN(K,0)) I 'XPDIS2 Q:TCHK
  1. ... I (XPD1="K ^"),'XPDIS2,RTN(K,0)[XPD1 S TCHK=$$KCHK^XPDANLYZ5(RTN(K,0),XPD1) Q:TCHK'=3
  1. ... I (XPD1="%"),'XPDIS2,RTN(K,0)[XPD1 S TCHK=$$MSQA^XPDANLYZ5(RTN(K,0),XPD1) Q:'TCHK ;$$GCHK^XPDANLYZ5(RTN(K,0),XPD1) D
  1. ... I (XPD1="IO"),'XPDIS2,RTN(K,0)[XPD1 S TCHK=$$MSQA^XPDANLYZ5(RTN(K,0),XPD1) Q:'TCHK
  1. ... I (XPD1="$I"),'XPDIS2,RTN(K,0)[XPD1 S TCHK=$$MSQA^XPDANLYZ5(RTN(K,0),XPD1) Q:'TCHK
  1. ... I (XPD1="DIC(0)"),'XPDIS2,RTN(K,0)[XPD1 S TCHK=$$MSQA^XPDANLYZ5(RTN(K,0),XPD1) Q:'TCHK
  1. ... I XPD1="U=",'XPDIS2,(RTN(K,0)["U=""^""")!(RTN(K,0)'?.E1P1"U=") Q
  1. ... I RTN(K,0)[XPD1 S XPDSQA(ROU,XPD1,K,TAGME)=RTN(K,0) I XTOG S:XPDARRR(XPD1,JJ,0)]"" XPDARRR(XPD1,JJ,0)=XPDARRR(XPD1,JJ,0)_" "_K_"," S:XPDARRR(XPD1,JJ,0)']"" XPDARRR(XPD1,JJ,0)="Lines: "_K_","
  1. . I XTOG D
  1. .. S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)="* The SQA Checklist identifies the following specific code "
  1. .. S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)=" references to check in this routine:",SQAC=XPCNT
  1. .. N MM S MM=" " F S MM=$O(XPDARRR(MM)) Q:MM']"" D
  1. ... I XPDARRR(MM,JJ,0)]"" S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)=$J(MM,8)_$J(" ",5)_$$TRIM^XLFSTR(XPDARRR(MM,JJ,0),"R",",")
  1. ... I $L(XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT))>73 D CUT^XPDANLYZ3
  1. .. S:SQAC=XPCNT XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)=$J(" ",2)_"- No specific code references from the SQA Checklist were found."
  1. . S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)=" "
  1. . S XPCNT=XPCNT+1,XPDARR("BUILD",XPDBIEN,"ROUTINE",JJ,XPCNT)=$$CJ^XLFSTR("<><><>",50)
  1. Q
  1. RSPELL(ROU) ;FIND TEXT IN ROUTINE BETWEEN QUOTES and after ";;"
  1. N X S X=ROU X ^%ZOSF("TEST") Q:'$T
  1. K RTN S XCNP=0,DIF="RTN(" X ^%ZOSF("LOAD")
  1. N K,CNT S (CNT,K)=0 F S K=$O(RTN(K)) Q:'K D
  1. . I RTN(K,0)[$C(34) N I,XTXT,TMP S TMP=RTN(K,0) F I=2:2:$L(TMP) D
  1. .. I $TR($E(TMP,1,10)," ",".")?."."1";".E Q ;DO NOT LOOK AT LINE THAT BEGINS WITH ';'
  1. .. S XTXT=$$TRIM^XLFSTR($P(TMP,$C(34),I)) I $L(XTXT)>2,XTXT?.E3A.E D
  1. ... I $L(XTXT)>14,XTXT'[$C(32) Q ;QUIT IF 15 OR MORE CHARACTERS WITHOUT A SPACE...PROBABLY CODE.
  1. ... I XTXT[("I "_$P(XTXT," ",2)) Q ;IF STATEMENT, NOT FOR SPELL CHECK
  1. ... N J,CLTXT S CLTXT="" I XTXT'[$C(32) Q:$E(XTXT,$L(XTXT))="(" F J=1:1:$L(XTXT) S:$E(XTXT,J)?1A CLTXT=CLTXT_$E(XTXT,J)
  1. ... I CLTXT]"" I $L(XTXT)>(2*$L(CLTXT)) Q ;NUMBER,PUNCUATION, FEW LETTERS
  1. ... Q:TMP[("("_$C(34)_XTXT) Q:TMP[("$J,"_$C(34)_XTXT) Q:TMP[(XTXT_$C(34)_",$J")
  1. ... Q:TMP[("DIC="_$C(34)_XTXT) Q:TMP[("DIC(0)="_$C(34)_XTXT) Q:TMP[("DR="_$C(34)_XTXT) Q:TMP[("DIE="_$C(34)_XTXT) Q:TMP[("DIC(""S"")="_$C(34)_XTXT)
  1. ... S XTXT=$J(K,3)_": "_XTXT S:$L(XTXT)<81 CNT=CNT+1,XPRSPL(ROU,CNT)=XTXT
  1. ... I $L(XTXT)>80 N L1,L2 S L1="",L2="" D LWRAP(XTXT,($L($P(XTXT,":"))+2)) S:L1]"" CNT=CNT+1,XPRSPL(ROU,CNT)=L1 S:L2]"" CNT=CNT+1,XPRSPL(ROU,CNT)=L2
  1. . I K>2,RTN(K,0)[";;" Q:RTN(K,0)[$C(34)_";;"_$C(34) Q:$L(RTN(K,0))<5 N XPT81 S XPT81=$J(K,3)_": "_$P(RTN(K,0),";;",2,99) D
  1. .. S:$L(XPT81)<81 CNT=CNT+1,XPRSPL(ROU,CNT)=XPT81 I $L(XPT81)>80 D
  1. ... N L1,L2 S L1="",L2="" D LWRAP(XPT81,($L($P(XPT81,":"))+2)) S:L1]"" CNT=CNT+1,XPRSPL(ROU,CNT)=L1 S:L2]"" CNT=CNT+1,XPRSPL(ROU,CNT)=L2
  1. Q
  1. LWRAP(LTXT,LW) ;
  1. N T0 S T0=LTXT
  1. F I=80:-1:60 D Q:L1]""
  1. . I $E(T0,I)?1P S L1=$E(T0,1,I),L2=$J(" ",LW)_$E(T0,(I+1),9999)
  1. . Q:L1]""
  1. S:L1']"" L1=LTXT
  1. Q