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

AZHLSC52.m

Go to the documentation of this file.
AZHLSC52 ; IHS/ADC/GTH:KEU:JN - SAC CHAPTER 2: M LANGUAGE PROGRAMMING & CONVENTIONS ;  [ 04/16/1999  1:15 PM ]
 ;;5.0;AZHLSC;;JUL 10, 1996
 ;
 ;IHS/ABQ/KEU - CHANGED DIF="Z(" TO ^TMP($J,"Z" AND OTHER
 ;REFERENCES TO THE ARRAY TO THE GLOBAL.
 NEW A,AC,ARG,AZHL0,AZHLA,AZHLB,CH,COM,DIF,EC,ERR,ERTX,GK,L,LAB,LABO,LI,LL,LOC,LV,NORTNS,OP,PL,Q,RDTIME,RTN,S,S1,STR,V,XCNP,Z
 D END 
 S NORTNS=$O(^UTILITY($J,""))="" G:NORTNS 5251
 S AZHL0="",(LAB,LABO)="",RTN="AZHL"
 F  K Z,^TMP($J,"Z") S AZHL0=$O(^UTILITY($J,AZHL0)) Q:AZHL0=""  S X=AZHL0,DIF="^TMP($J,""Z"",",XCNP=0 X "X ^%ZOSF(""LOAD""),AZHLGFCX" I  D
 .F AZHLB=3:1 Q:'$D(^TMP($J,"Z",AZHLB))  D
 ..S Z=^TMP($J,"Z",AZHLB,0)
 ..I Z["S ^UTILITY(" D EN^AZHLSC46 Q:AZHLSC4I=1  S ^TMP($J,"2.3.2.5",AZHL0,AZHLB)=Z
 ..I Z["S ^TMP(" D CHKTMP I AZHLSC4I'=1  D EN^AZHLSC46 I AZHLSC4I'=1  S ^TMP($J,"2.3.2.5.1",AZHL0,AZHLB)=Z
 ..I Z["^XTMP(" D CHKXTMP I AZHLSC4I'=1  D EN^AZHLSC46 Q:AZHLSC4I=1  S ^TMP($J,"2.3.2.5.2",AZHL0,AZHLB)=Z
 .Q
5251 D TTL^AZHLSC("2.3.2.5),  Use of ^UTILITY")
 I NORTNS D NRTN^AZHLSC G 52512 
 I $L($O(^TMP($J,"2.3.2.5",""))) W !?10,"Possible SET of ^UTILITY( global." S %="" F  S %=$O(^TMP($J,"2.3.2.5",%)) Q:%=""  S A=0 F  S A=$O(^TMP($J,"2.3.2.5",%,A)) Q:'A  W !?10,"+",A,"^",%," :  ",^(A)
52512 D TTL^AZHLSC("2.3.2.5.1),   Should be ^TMP($J or ^TMP(NAMESPACE,$J")
 I NORTNS D NRTN^AZHLSC G 52513 
 I $L($O(^TMP($J,"2.3.2.5.1",""))) W !?10,"Improper use of ^TMP(  global." S %="" F  S %=$O(^TMP($J,"2.3.2.5.1",%)) Q:%=""  S A=0 F  S A=$O(^TMP($J,"2.3.2.5.1",%,A)) Q:'A  W !?10,"+",A,"^",%," :  ",^(A)
52513 D TTL^AZHLSC("2.3.2.5.2),   Should be  ^XTMP(NAMESPACE")
 I NORTNS D NRTN^AZHLSC G X
 I $L($O(^TMP($J,"2.3.2.5.2",""))) W !?10,"Improper use of ^XTMP(  global." S %="" F  S %=$O(^TMP($J,"2.3.2.5.2",%)) Q:%=""  S A=0 F  S A=$O(^TMP($J,"2.3.2.5.2",%,A)) Q:'A  W !?10,"+",A,"^",%," :  ",^(A)
X Q
 ;
END K ^TMP($J,"2.3.2.5"),^TMP($J,"2.3.2.5.1"),^TMP($J,"2.3.2.5.2"),^("Z")
 ;K ^TMP($J,"Z")
 Q
CHKTMP ;  ^TMP($J, OR ^TMP(NAMESPACE,$J
 S AZHLSCF="",AZHLSC4I="",AZHLSCG=""
 S AZHLSCF=$F(Z,"^TMP(") Q:AZHLSCF=0  
 I $E(Z,AZHLSCF,AZHLSCF+1)="$J" S AZHLSC4I=1 Q
 Q:$D(AZHLNMSP)=""  S AZHLSCG=$E(Z,AZHLSCF,AZHLSCF+40) I $P(AZHLSCG,",",2)["$J",($P(AZHLSCG,",",1)[AZHLNMSP) S AZHLSC4I=1 Q
 S AZHLSC4I=0 Q
CHKXTMP ;  ^XTMP(NAMESPACE
 Q:$D(AZHLNMSP)=""
 S AZHLSCF="",AZHLSC4I="",AZHLSCG=""
 S AZHLSCF=$F(Z,"^XTMP(") Q:AZHLSCF=0  
 I $E(Z,AZHLSCF,AZHLSCF+4)[AZHLNMSP S AZHLSC4I=1 Q
 S AZHLSC4I=0 Q