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

AZHLSC44.m

Go to the documentation of this file.
AZHLSC44 ; IHS/HQW/JN - SAC CHAPTER 2:  M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS ;  [ 04/15/1999  9:28 AM ]
 ;;5.0;AZHLSC;;JAN 17,1997
EN ;EP       FIND COMMENT OR TEXT   NAKED GLOBAL   
 S (Z(Z),Z1)=^TMP($J,"Z")
 ; GO CHECK FOR INITS, TEMPLATES
 D EN^AZHLSC46
 I AZHLSC4I=1 G AZHLSCKV
 ;      CHECK FOR TEXT DATA
 S AZHLSCF=0
 D EN^AZHLSC47 I AZHLSC4I=1 Q 
 S Z1=Z(Z)
 ;I $F(Z1,";;") G AZHLISO
 ;      FIND COMMENT LINE,IF FURTHER THAN 11, LINE OF CODE COMMENT
 ;S AZHLSCF=$F(Z1,";") I AZHLSCF=0 G AZHLISO
 ;I AZHLSCF<12 G AZHLSCKV
 S AZHLSCF=0
AZHLISO ;       ISOLATE NAKED GLB
 S AZHLSCF=$F(Z1,"^(",AZHLSCF) G:AZHLSCF=0 AZHLSCKV
 S AZHLSCF1=$F(Z1,")",AZHLSCF) G:AZHLSCF1=0 AZHLSCKV
 I (AZHLSCF1-AZHLSCF)>12 G AZHLSCKV
 S AZHLSCF5=$F(Z1,"DIC(""S"")=") G:AZHLSCF5>0 AZHLSCKV
 S AZHLSCF5=$F(Z1,"DIC(""W"")=") G:AZHLSCF5>0 AZHLSCKV
 S AZHLSCF5=$F(Z1,"DIC=""") G:AZHLSCF5>0 AZHLSCKV
 S AZHLSCF2=$E(Z1,AZHLSCF,AZHLSCF1-2)
 S AZHLSCF2=$P(AZHLSCF2,",",1)
 S AZHLSCF3=$L(AZHLSCF2)
 ;        SEARCH FOR FULL GLOBAL DEFINITION ON SAME LINE
 ;     BACKWARD SEARCH FOR FULL REFERENCE
AZHLSCBW F I=AZHLSCF:-1 Q:I<1  I $E(Z1,I-1,I+AZHLSCF3-2)=AZHLSCF2 G AZHLISO
 ;     FORWARD SEARCH
 S AZHLSCF4=$L(Z1)
 F I=AZHLSCF1:1:AZHLSCF4 I $E(Z1,I-1,I+AZHLSCF3-2)=AZHLSCF2 G AZHLISO
 I $F(AZHLSCF2,",",2) G AZHLSCCR
AZHLSCET ;         SET RECORD UP FOR REPORT
 S ^TMP($J,"2.2.10",AZHL0,AZHLB)=^TMP($J,"Z")
AZHLSCKV ;      KILL VARIABLES
 K AZHLSCF,AZHSCF2,AZHLSCF1,AZHLSCF3,AZHLSCF4,AZHLSCF5,AZHLSCF6,Z
 Q
AZHLSCCR S AZHLSCF2=$P(AZHLSCF2,",",2),AZHLSCF2=","_AZHLSCF2_")"
 S AZHLSCF3=$L(AZHLSCF2)
 ;   GO START SEARCH FOR FULL REFERENCE
 G AZHLSCBW