DGYMFILE ;ALB/MLI - Set File Access Codes for MAS files ; October 20, 1994
 ;;5.3;Registration;**49**;Aug 13, 1993
 ;
 ; This routine will loop through the MAS files and show the site's
 ; existing file access and the recommended file access.  It will
 ; also give the site the opportunity to update the file access for
 ; one, many, or all of the files on the list.
 ;
 ; Must be run by someone with DUZ(0)="@".
 ;
EN ; entry point to print list of existing and recommended file access
 I $G(DUZ(0))'="@" W !,"You must have DUZ(0) set to '@' before continuing" G Q
 F I=1:1 S X=$P($T(TEXT+I),";;",2) Q:X="QUIT"  W !,X
 S ZTDESC="Generate list of file access codes",ZTRTN="PRINT^DGYMFIL2"
 D ZIS^DGUTQ
 I 'POP D PRINT^DGYMFIL2
Q K I,POP,X,ZTDESC,ZTIO,ZTRTN,ZTSK
 D CLOSE^DGUTQ
 Q
 ;
 ;
TEXT ; text lines for help
 ;;This call will generate a listing of current file access on all MAS files
 ;;along with the recommended access.  Where the recommended access does not
 ;;equal the current access, an * will be printed prior to the file number.
 ;;Once this listing has been reviewed, you can call EDIT^DGYMFILE to take
 ;;the recommended access for one, many, or all files on the list.
 ;;
 ;;To abort this process, enter an '^' at the Device prompt.
 ;;
 ;;QUIT
 ;
 ;
EDIT ; edit file access for one, many, or all MAS files
 I $G(DUZ(0))'="@" W !,"You must have DUZ(0) set to '@' before continuing" G Q
 F I=1:1 S X=$P($T(EDITTXT+I),";;",2) Q:X="QUIT"  W !,X
 D LOAD^DGYMFIL2 ; put file list into TMP global
 S DIC="^DIC(",DIC("S")="I $G(^TMP($J,""DGYMFILE"",+Y))",VAUTNI=2,VAUTSTR="file",VAUTVB="DGYMFILE"
 D FIRST^VAUTOMA ; select one, many, or all MAS files
 I Y<0 W !,"Operation aborted...call EDIT^DGYMFILE to begin again" G EDITQ
 I DGYMFILE D  ; if all MAS files selected
 . F I=0:0 S I=$O(^TMP($J,"DGYMFILE",I)) Q:'I  D SET(^(I))
 I 'DGYMFILE D  ; if one or many MAS files selected
 . F I=0:0 S I=$O(DGYMFILE(I)) Q:'I  D SET(^TMP($J,"DGYMFILE",I))
 W !,"File updating has been completed!"
EDITQ K DIC,DGYMFILE,I,VAUTNI,VAUTSTR,VAUTVB,X,Y,^TMP($J,"DGYMFILE")
 Q
 ;
SET(X) ; set recommended file access into selected file
 ;
 ; Input - X as File IEN^Read^Write^Delete^Laygo
 ;
 S ^DIC(+X,0,"DD")="@" ; all dd access set to @
 S ^DIC(+X,0,"RD")="d" ; all read access set to d
 S ^DIC(+X,0,"WR")=$P(X,"^",2)
 S ^DIC(+X,0,"DEL")=$P(X,"^",3)
 S ^DIC(+X,0,"LAYGO")=$P(X,"^",4)
 Q
 ;
EDITTXT ; text for edit process
 ;;This call will allow you to accept the recommended file security codes
 ;;for one, many, or all MAS files.  You should have already reviewed the
 ;;printout generated from the EN^DGYMFILE call which shows your current vs.
 ;;recommended file access codes. It is recommended that you accept the
 ;;file security for all files.
 ;;
 ;;To abort this process, enter an '^' at the 'Select File:  ALL//' prompt.
 ;;
 ;;QUIT
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGYMFILE   2906     printed  Sep 23, 2025@20:36:15                                                                                                                                                                                                    Page 2
DGYMFILE  ;ALB/MLI - Set File Access Codes for MAS files ; October 20, 1994
 +1       ;;5.3;Registration;**49**;Aug 13, 1993
 +2       ;
 +3       ; This routine will loop through the MAS files and show the site's
 +4       ; existing file access and the recommended file access.  It will
 +5       ; also give the site the opportunity to update the file access for
 +6       ; one, many, or all of the files on the list.
 +7       ;
 +8       ; Must be run by someone with DUZ(0)="@".
 +9       ;
EN        ; entry point to print list of existing and recommended file access
 +1        IF $GET(DUZ(0))'="@"
               WRITE !,"You must have DUZ(0) set to '@' before continuing"
               GOTO Q
 +2        FOR I=1:1
               SET X=$PIECE($TEXT(TEXT+I),";;",2)
               if X="QUIT"
                   QUIT 
               WRITE !,X
 +3        SET ZTDESC="Generate list of file access codes"
           SET ZTRTN="PRINT^DGYMFIL2"
 +4        DO ZIS^DGUTQ
 +5        IF 'POP
               DO PRINT^DGYMFIL2
Q          KILL I,POP,X,ZTDESC,ZTIO,ZTRTN,ZTSK
 +1        DO CLOSE^DGUTQ
 +2        QUIT 
 +3       ;
 +4       ;
TEXT      ; text lines for help
 +1       ;;This call will generate a listing of current file access on all MAS files
 +2       ;;along with the recommended access.  Where the recommended access does not
 +3       ;;equal the current access, an * will be printed prior to the file number.
 +4       ;;Once this listing has been reviewed, you can call EDIT^DGYMFILE to take
 +5       ;;the recommended access for one, many, or all files on the list.
 +6       ;;
 +7       ;;To abort this process, enter an '^' at the Device prompt.
 +8       ;;
 +9       ;;QUIT
 +10      ;
 +11      ;
EDIT      ; edit file access for one, many, or all MAS files
 +1        IF $GET(DUZ(0))'="@"
               WRITE !,"You must have DUZ(0) set to '@' before continuing"
               GOTO Q
 +2        FOR I=1:1
               SET X=$PIECE($TEXT(EDITTXT+I),";;",2)
               if X="QUIT"
                   QUIT 
               WRITE !,X
 +3       ; put file list into TMP global
           DO LOAD^DGYMFIL2
 +4        SET DIC="^DIC("
           SET DIC("S")="I $G(^TMP($J,""DGYMFILE"",+Y))"
           SET VAUTNI=2
           SET VAUTSTR="file"
           SET VAUTVB="DGYMFILE"
 +5       ; select one, many, or all MAS files
           DO FIRST^VAUTOMA
 +6        IF Y<0
               WRITE !,"Operation aborted...call EDIT^DGYMFILE to begin again"
               GOTO EDITQ
 +7       ; if all MAS files selected
           IF DGYMFILE
               Begin DoDot:1
 +8                FOR I=0:0
                       SET I=$ORDER(^TMP($JOB,"DGYMFILE",I))
                       if 'I
                           QUIT 
                       DO SET(^(I))
               End DoDot:1
 +9       ; if one or many MAS files selected
           IF 'DGYMFILE
               Begin DoDot:1
 +10               FOR I=0:0
                       SET I=$ORDER(DGYMFILE(I))
                       if 'I
                           QUIT 
                       DO SET(^TMP($JOB,"DGYMFILE",I))
               End DoDot:1
 +11       WRITE !,"File updating has been completed!"
EDITQ      KILL DIC,DGYMFILE,I,VAUTNI,VAUTSTR,VAUTVB,X,Y,^TMP($JOB,"DGYMFILE")
 +1        QUIT 
 +2       ;
SET(X)    ; set recommended file access into selected file
 +1       ;
 +2       ; Input - X as File IEN^Read^Write^Delete^Laygo
 +3       ;
 +4       ; all dd access set to @
           SET ^DIC(+X,0,"DD")="@"
 +5       ; all read access set to d
           SET ^DIC(+X,0,"RD")="d"
 +6        SET ^DIC(+X,0,"WR")=$PIECE(X,"^",2)
 +7        SET ^DIC(+X,0,"DEL")=$PIECE(X,"^",3)
 +8        SET ^DIC(+X,0,"LAYGO")=$PIECE(X,"^",4)
 +9        QUIT 
 +10      ;
EDITTXT   ; text for edit process
 +1       ;;This call will allow you to accept the recommended file security codes
 +2       ;;for one, many, or all MAS files.  You should have already reviewed the
 +3       ;;printout generated from the EN^DGYMFILE call which shows your current vs.
 +4       ;;recommended file access codes. It is recommended that you accept the
 +5       ;;file security for all files.
 +6       ;;
 +7       ;;To abort this process, enter an '^' at the 'Select File:  ALL//' prompt.
 +8       ;;
 +9       ;;QUIT