AZHLSC43 ; IHS/ADC/GTH:KEU:JN - SAC CHAPTER 2: M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS) ; [ 08/02/1999 7:47 AM ]
;;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 AZHLB=3:1:XCNP S Z=AZHLB,(Z(Z),^TMP($J,"Z"))=^TMP($J,"Z",AZHLB,0) D
EN ..I ^TMP($J,"Z")["^(" D ^AZHLSC44
..Q
.K ^TMP($J,"Z") ;K Z
.Q
2210 D TTL^AZHLSC("2.2.10, (9.8) Naked Global References")
I $O(^UTILITY($J,""))="" D NRTN^AZHLSC G END
I $L($O(^TMP($J,"2.2.10",""))) W !?10,"SUSPECT Naked Reference without full Global Reference." S %="" F S %=$O(^TMP($J,"2.2.10",%)) Q:%="" S A=0 F S A=$O(^TMP($J,"2.2.10",%,A)) Q:'A W !?10,"+",A,"^",%," : ",^(A)
END K ^("2.2.10"),^("Z"),Z
Q
225 NEW AZHLB,AZHLFLD,AZHL0,BFN,DIF,EFN,F,G,XCNP,Z
D END1 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 AZHLB=3:1:XCNP S ^TMP($J,"Z")=^TMP($J,"Z",AZHLB,0) D
..D ^AZHLSC46 Q:AZHLSC4I=1 Q:$L(^TMP($J,"Z"))<"512" S ^TMP($J,"2.2.5",AZHL0,AZHLB)=^TMP($J,"Z")
..Q
.K ^TMP($J,"Z") ;K Z
.Q
2251 D TTL^AZHLSC("2.2.5, Line body must not exceed 512 characters")
I $O(^UTILITY($J,""))="" D NRTN^AZHLSC G END
I $L($O(^TMP($J,"2.2.5",""))) W !?10," " S %="" F S %=$O(^TMP($J,"2.2.5",%)) Q:%="" S A=0 F S A=$O(^TMP($J,"2.2.5",%,A)) Q:'A W !?10,"+",A,"^",%," : ",^(A)
END1 K ^("2.2.5"),^("Z"),Z
Q
AZHLSC43 ; IHS/ADC/GTH:KEU:JN - SAC CHAPTER 2: M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS) ; [ 08/02/1999 7:47 AM ]
+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 AZHLB=3:1:XCNP
SET Z=AZHLB
SET (Z(Z),^TMP($JOB,"Z"))=^TMP($JOB,"Z",AZHLB,0)
Begin DoDot:2
EN IF ^TMP($JOB,"Z")["^("
DO ^AZHLSC44
+1 QUIT
End DoDot:2
+2 ;K Z
KILL ^TMP($JOB,"Z")
+3 QUIT
End DoDot:1
2210 DO TTL^AZHLSC("2.2.10, (9.8) Naked Global References")
+1 IF $ORDER(^UTILITY($JOB,""))=""
DO NRTN^AZHLSC
GOTO END
+2 IF $LENGTH($ORDER(^TMP($JOB,"2.2.10","")))
WRITE !?10,"SUSPECT Naked Reference without full Global Reference."
SET %=""
FOR
SET %=$ORDER(^TMP($JOB,"2.2.10",%))
IF %=""
QUIT
SET A=0
FOR
SET A=$ORDER(^TMP($JOB,"2.2.10",%,A))
IF 'A
QUIT
WRITE !?10,"+",A,"^",%," : ",^(A)
END KILL ^("2.2.10"),^("Z"),Z
+1 QUIT
225 NEW AZHLB,AZHLFLD,AZHL0,BFN,DIF,EFN,F,G,XCNP,Z
+1 DO END1
SET AZHL0=""
+2 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
+3 FOR AZHLB=3:1:XCNP
SET ^TMP($JOB,"Z")=^TMP($JOB,"Z",AZHLB,0)
Begin DoDot:2
+4 DO ^AZHLSC46
IF AZHLSC4I=1
QUIT
IF $LENGTH(^TMP($JOB,"Z"))<"512"
QUIT
SET ^TMP($JOB,"2.2.5",AZHL0,AZHLB)=^TMP($JOB,"Z")
+5 QUIT
End DoDot:2
+6 ;K Z
KILL ^TMP($JOB,"Z")
+7 QUIT
End DoDot:1
2251 DO TTL^AZHLSC("2.2.5, Line body must not exceed 512 characters")
+1 IF $ORDER(^UTILITY($JOB,""))=""
DO NRTN^AZHLSC
GOTO END
+2 IF $LENGTH($ORDER(^TMP($JOB,"2.2.5","")))
WRITE !?10," "
SET %=""
FOR
SET %=$ORDER(^TMP($JOB,"2.2.5",%))
IF %=""
QUIT
SET A=0
FOR
SET A=$ORDER(^TMP($JOB,"2.2.5",%,A))
IF 'A
QUIT
WRITE !?10,"+",A,"^",%," : ",^(A)
END1 KILL ^("2.2.5"),^("Z"),Z
+1 QUIT