AZHLSC50 ; IHS/ADC/GTH:KEU:JN - SAC CHAPTER 2: M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS) ; [ 08/26/97 1:56 PM ]
;;5.0;AZHLSC;;JUL 10, 1996
;
NEW AZHLB,AZHLFLD,AZHL0,BFN,DIF,EFN,F,G,XCNP,Z
D END S AZHL0=""
F S AZHL0=$O(^UTILITY($J,AZHL0)) Q:AZHL0="" W:AZHLTERM "." S X=AZHL0,DIF="^TMP($J,""Z"",",XCNP=0 X "X ^%ZOSF(""LOAD""),AZHLGFCX" I S XCNP=XCNP-1 D
.F Z=3:1:XCNP S (^TMP($J,"Z"),Z(Z))=^TMP($J,"Z",Z,0) D
..I ^TMP($J,"Z")["S ^"!(^TMP($J,"Z")["D ^DIE") D EN^AZHLSC47 Q:AZHLSC4I=1 D EN^AZHLSC46 Q:AZHLSC4I=1 D AZHLSC55 Q:AZHLSC4I=1 S ^TMP($J,"2.4.7.2A",AZHL0,Z)=^TMP($J,"Z")
..Q
.K ^TMP($J,"Z") ;K Z
.Q
2210 D TTL^AZHLSC("2.4.7.2A Global Update")
I $O(^UTILITY($J,""))="" D NRTN^AZHLSC G END
I $L($O(^TMP($J,"2.4.7.2A",""))) W !?10,"SUSPECT Global UPDATE, CHECK FOR LOCK INCREMENTAL/DECREMENTAL." S %="" F S %=$O(^TMP($J,"2.4.7.2A",%)) Q:%="" S A=0 F S A=$O(^TMP($J,"2.4.7.2A",%,A)) Q:'A W !?10,"+",A,"^",%," : ",^(A)
END K ^("2.4.7.2A"),^("Z"),Z Q
AZHLSC55 ; SEARCH FOR ^TMP ^% ^UTILITY GLOBALS
S AZHLSC4I=0
I ^TMP($J,"Z")["S ^TMP"!(^TMP($J,"Z")["S ^%")!(^TMP($J,"Z")["S ^UTILITY") S AZHLSC4I=1
Q
AZHLSC50 ; IHS/ADC/GTH:KEU:JN - SAC CHAPTER 2: M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS) ; [ 08/26/97 1:56 PM ]
+1 ;;5.0;AZHLSC;;JUL 10, 1996
+2 ;
+3 NEW AZHLB,AZHLFLD,AZHL0,BFN,DIF,EFN,F,G,XCNP,Z
+4 DO END
SET AZHL0=""
+5 FOR
SET AZHL0=$ORDER(^UTILITY($JOB,AZHL0))
IF AZHL0=""
QUIT
IF AZHLTERM
WRITE "."
SET X=AZHL0
SET DIF="^TMP($J,""Z"","
SET XCNP=0
XECUTE "X ^%ZOSF(""LOAD""),AZHLGFCX"
IF $TEST
SET XCNP=XCNP-1
Begin DoDot:1
+6 FOR Z=3:1:XCNP
SET (^TMP($JOB,"Z"),Z(Z))=^TMP($JOB,"Z",Z,0)
Begin DoDot:2
+7 IF ^TMP($JOB,"Z")["S ^"!(^TMP($JOB,"Z")["D ^DIE")
DO EN^AZHLSC47
IF AZHLSC4I=1
QUIT
DO EN^AZHLSC46
IF AZHLSC4I=1
QUIT
DO AZHLSC55
IF AZHLSC4I=1
QUIT
SET ^TMP($JOB,"2.4.7.2A",AZHL0,Z)=^TMP($JOB,"Z")
+8 QUIT
End DoDot:2
+9 ;K Z
KILL ^TMP($JOB,"Z")
+10 QUIT
End DoDot:1
2210 DO TTL^AZHLSC("2.4.7.2A Global Update")
+1 IF $ORDER(^UTILITY($JOB,""))=""
DO NRTN^AZHLSC
GOTO END
+2 IF $LENGTH($ORDER(^TMP($JOB,"2.4.7.2A","")))
WRITE !?10,"SUSPECT Global UPDATE, CHECK FOR LOCK INCREMENTAL/DECREMENTAL."
SET %=""
FOR
SET %=$ORDER(^TMP($JOB,"2.4.7.2A",%))
IF %=""
QUIT
SET A=0
FOR
SET A=$ORDER(^TMP($JOB,"2.4.7.2A",%,A))
IF 'A
QUIT
WRITE !?10,"+",A,"^",%," : ",^(A)
END KILL ^("2.4.7.2A"),^("Z"),Z
QUIT
AZHLSC55 ; SEARCH FOR ^TMP ^% ^UTILITY GLOBALS
+1 SET AZHLSC4I=0
+2 IF ^TMP($JOB,"Z")["S ^TMP"!(^TMP($JOB,"Z")["S ^%")!(^TMP($JOB,"Z")["S ^UTILITY")
SET AZHLSC4I=1
+3 QUIT