AZHLSC53 ; IHS/ADC/GTH:KEU:JN - SAC CHAPTER 2: M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS ; [ 06/05/1998 7:25 AM ]
;;5.0;AZHLSC;;JUL 10, 1996
;
NEW AZHLFILE,AZHLFLD,A,B
526 D TTL^AZHLSC("2.3.2.6, (10.1) Executable Fields.")
I 'AZHLPIEN D NPKG^AZHLSC Q
S AZHLFILE=0
F S AZHLFILE=$O(^DIC(9.4,AZHLPIEN,4,"B",AZHLFILE)) Q:'AZHLFILE D FLD
Q
FLD S AZHLFLD=0 F S AZHLFLD=$O(^DD(AZHLFILE,AZHLFLD)) Q:'AZHLFLD D CHK
Q
CHK I '$P(^DD(AZHLFILE,AZHLFLD,0),U,2) W:($P(^(0),U,2)["K")&($S('$D(^(9)):1,(^(9)'="@"):1,1:0)) !?10,"File ",AZHLFILE,", Field ",AZHLFLD," is MUMPS field and Write access is not '@'." Q
I +$P(^DD(AZHLFILE,AZHLFLD,0),U,2) S AZHL=+$P(^(0),U,2) D
.NEW AZHLFILE,AZHLFLD S AZHLFILE=AZHL D FLD
.Q
Q
AZHLSC53 ; IHS/ADC/GTH:KEU:JN - SAC CHAPTER 2: M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS ; [ 06/05/1998 7:25 AM ]
+1 ;;5.0;AZHLSC;;JUL 10, 1996
+2 ;
+3 NEW AZHLFILE,AZHLFLD,A,B
526 DO TTL^AZHLSC("2.3.2.6, (10.1) Executable Fields.")
+1 IF 'AZHLPIEN
DO NPKG^AZHLSC
QUIT
+2 SET AZHLFILE=0
+3 FOR
SET AZHLFILE=$ORDER(^DIC(9.4,AZHLPIEN,4,"B",AZHLFILE))
IF 'AZHLFILE
QUIT
DO FLD
+4 QUIT
FLD SET AZHLFLD=0
FOR
SET AZHLFLD=$ORDER(^DD(AZHLFILE,AZHLFLD))
IF 'AZHLFLD
QUIT
DO CHK
+1 QUIT
CHK IF '$PIECE(^DD(AZHLFILE,AZHLFLD,0),U,2)
IF ($PIECE(^(0),U,2)["K")&($SELECT('$DATA(^(9))
WRITE !?10,"File ",AZHLFILE,", Field ",AZHLFLD," is MUMPS field and Write access is not '@'."
QUIT
+1 IF +$PIECE(^DD(AZHLFILE,AZHLFLD,0),U,2)
SET AZHL=+$PIECE(^(0),U,2)
Begin DoDot:1
+2 NEW AZHLFILE,AZHLFLD
SET AZHLFILE=AZHL
DO FLD
+3 QUIT
End DoDot:1
+4 QUIT