AZHLSC45 ; IHS/HQW/JN - SAC CHAPTER 2: M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS ; [ 11/17/1998 1:23 PM ]
;;5.0;AZHLSC;;JAN 17,1997
EN ;EP FIND %AU
S AZHLSCVA=0,AZHLSCIN=1
I Z(Z)["^%AU" G AZHLSCST
I Z(Z)[" %AU" G AZHLSCED
AZHLSCPA ;
S AZHLSCVA=$F(Z(Z),"^AU",AZHLSCVA)
I AZHLSCVA=0 G AZHLSCST
S AZHLSCIN=1
; LOOK FOR ^AUPNPAT
AZHLSCPT ;
I $E(Z(Z),AZHLSCVA,AZHLSCVA+4)="PNPAT" S AZHLSCIN=0 G AZHLSCPA
I $E(Z(Z),AZHLSCVA,AZHLSCVA+1)="PN" S AZHLSCIN=0 G AZHLSCPA
AZHLSCST ; SET RECORD FOR PRINT
I AZHLSCIN=0 G AZHLSCED
S ^TMP($J,"2218",AZHL,Z)=Z(Z)
AZHLSCED K AZHLSCVA,AZHLSCIN
Q
AZHLSC45 ; IHS/HQW/JN - SAC CHAPTER 2: M LANGUAGE PROGRAMMING STANDARDS & CONVENTIONS ; [ 11/17/1998 1:23 PM ]
+1 ;;5.0;AZHLSC;;JAN 17,1997
EN ;EP FIND %AU
+1 SET AZHLSCVA=0
SET AZHLSCIN=1
+2 IF Z(Z)["^%AU"
GOTO AZHLSCST
+3 IF Z(Z)[" %AU"
GOTO AZHLSCED
AZHLSCPA ;
+1 SET AZHLSCVA=$FIND(Z(Z),"^AU",AZHLSCVA)
+2 IF AZHLSCVA=0
GOTO AZHLSCST
+3 SET AZHLSCIN=1
+4 ; LOOK FOR ^AUPNPAT
AZHLSCPT ;
+1 IF $EXTRACT(Z(Z),AZHLSCVA,AZHLSCVA+4)="PNPAT"
SET AZHLSCIN=0
GOTO AZHLSCPA
+2 IF $EXTRACT(Z(Z),AZHLSCVA,AZHLSCVA+1)="PN"
SET AZHLSCIN=0
GOTO AZHLSCPA
AZHLSCST ; SET RECORD FOR PRINT
+1 IF AZHLSCIN=0
GOTO AZHLSCED
+2 SET ^TMP($JOB,"2218",AZHL,Z)=Z(Z)
AZHLSCED KILL AZHLSCVA,AZHLSCIN
+1 QUIT