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

AZHLSC54.m

Go to the documentation of this file.
AZHLSC54 ; IHS/HQW/JN - SAC CHAPTER 2:  M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS ;  [ 03/05/97  10:18 AM ] [1/13/00 2:21pm]
 ;;5.0;AZHLSC;;JAN 17,1997
EN ;EP     FIND CONDITIONAL AND ^% GLOBALS IN STRING
 D EN^AZHLSC46 Q:AZHLSC4I=1
 I Z(Z)["K ^%"!(Z(Z)["S ^%") D AZHLSET Q
 S AZHLSCF=$F(Z(Z),"^%") Q:AZHLSCF=0  
 I $E(Z(Z),AZHLSCF-3,AZHLSCF-1)=",^%" D AZHLSTR Q 
 I $E(Z(Z),AZHLSCF-3,AZHLSCF-1)=" ^%" D AZHLSCCO Q      
 Q
AZHLSTR ;   SEARCH FOR  K OR S FOR IMBEDED % GL 
 F I=AZHLSCF:-1 Q:I<1  I $E(Z(Z),I)[" " D AZHLSEAR Q
 Q
AZHLSCCO ;    SEARCH FOR CONDITIONAL K OR S 
 F I=AZHLSCF:-1 Q:I<1  I $E(Z(Z),I)=":" D AZHLSUB Q:AZHLNM>12  D AZHLSEAR Q
 Q
AZHLSEAR ;
 I $E(Z(Z),I-2,I-1)=" K" D AZHLSET Q
 I $E(Z(Z),I-2,I-1)=" S" D AZHLSET Q
 Q
AZHLSET ;
 K AZHLSCF,I,AZHLNM S ^TMP($J,"2.3.2.4",AZHL0,AZHLB)=^TMP($J,"Z")
 Q
AZHLSUB ;   
 S AZHLNM=AZHLSCF-I Q