Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DGYMFILE

DGYMFILE.m

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