AGSETPRT ;IHS/ITSC/EG - SET FILE PROTECTIONS
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
LP ;EP - loop through file entries
F I=1:1 D Q:AGTXT["end"
.S AGTXT=$T(TXT+I)
.Q:AGTXT["end"
.F J=2:1:4 S AG(J)=$P(AGTXT,";;",J)
.S AG(3)=""""_AG(3)_""""
.S AGREF="^DIC("_AG(2)_",0,"_AG(3)_")"
.S @AGREF=AG(4)
Q
TXT ;file entries start here
;;9000039;;AUDIT;;@
;;9000039;;DD;;@
;;9000039;;DEL;;M
;;9000039;;LAYGO;;M
;;9000039;;RD;;M
;;9000039;;WR;;M
;;end
Q
AGSETPRT ;IHS/ITSC/EG - SET FILE PROTECTIONS
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
LP ;EP - loop through file entries
+1 FOR I=1:1
Begin DoDot:1
+2 SET AGTXT=$TEXT(TXT+I)
+3 IF AGTXT["end"
QUIT
+4 FOR J=2:1:4
SET AG(J)=$PIECE(AGTXT,";;",J)
+5 SET AG(3)=""""_AG(3)_""""
+6 SET AGREF="^DIC("_AG(2)_",0,"_AG(3)_")"
+7 SET @AGREF=AG(4)
End DoDot:1
IF AGTXT["end"
QUIT
+8 QUIT
TXT ;file entries start here
+1 ;;9000039;;AUDIT;;@
+2 ;;9000039;;DD;;@
+3 ;;9000039;;DEL;;M
+4 ;;9000039;;LAYGO;;M
+5 ;;9000039;;RD;;M
+6 ;;9000039;;WR;;M
+7 ;;end
+8 QUIT