PURGER 93B Copyright (c) 1990 Allegro Consultants, Inc. PURGER PURGER is a program that purges files specified by filesets. Any MPE LISTF acceptable wildcards may be used. PURGER may be run with an INFO parameter, or it can accept a wildcard fileset specification from $STDINX. If PURGER is not passed an INFO parameter, it simply loops and reads from $STDINX. You can terminate PURGER by entering: // Output is sent to $STDLIST. By default, PURGER walks a line between being conservative and being aggresive. This 'line' can be controlled via PARM bits. PARM bits: Bit Value # To Add Meaning --- ----- ---------------------------------------------- 15 1 Ask for confirmation before every purge; 14 2 Quiet (don't report names of files purged); 13 4 Quit when an error occurs; 12 8 Do NOT purge files. (Used during development) 11 16 Use SHR access (default is Exclusive access) Note: use of this option may result in a file appearing to NOT be purged, until the last user closes it...and then...poof! it is gone (probably). 10 32 (u n u s e d) 7,8,9 ? The value of these three bits is used as the 'access' value in the aoptions word passed to the FOPEN intrinsic. Values: 0 = read, 1 = write, 2 = write(save), 3 = append, 4 = I/O, 5 = update This option is provided in case future versions of MPE are enhanced to use the access type as a guide to whether or not "scrubbing" the disc is required for security. INFO String If PURGER is run with an INFO string, it will purge the specified fileset and then terminate. Otherwise, it will enter a loop, prompting for a fileset, purging it, and then prompting again. This loop can be terminated by entering Exit or //. Unix Style options A fileset may be preceded by Unix-style options (i.e. a dash followed by an option name, as in: -i ) Options are: -i Interactive...ask for confirmation before purging -f Force ... always purge (overrides -i) -help Prints this help information -hfs Assume HFS file names -hfsonly Only purge files that are not in the MPE namespace -test Don't actually purge any files, just go through all of the rest of the motions. EXAMPLES The following examples show how PURGER works: RUN PURGER;INFO="@K@" Purges all files with a K in their name in the logon group. RUN PURGER;INFO="@.FOO" PURGER will ask if you really want to purge @.FOO. If you don't, it will terminate. Otherwise, it will purge all of the files in the group FOO. Note: no question will be asked in batch. You can answer: N (for NO), Q (for QUIT, which acts like NO), Y (for YES, which says you do want to purge the files in the group), or A (for ASK, which says you want to be asked for each file). RUN PURGER;INFO="LOG####.PUB.SYS;PARM=1 PURGER will list each file in LOG####.PUB.SYS and ask if it should be purged. If No (or ) is entered, the file Confirmation When PURGER asks for confirmation that a file should be purged, the question looks like: LOG0380.PUB.SYS (NO/yes/quit/all) ? A single character is read from $STDINX. Lowercase input is shifted to uppercase automatically. The file will be purged ONLY if a "Y" is entered. An "N" or will cause PURGER to skip the file and continue with the rest of the files in the fileset. A "Q" will cause PURGER to immediately terminate. An "A" will tell PURGER to purge this file AND all subsequent files without asking any more questions. OOPS If you made a mistake and PURGER has started to purge some files you wanted, hit control-Y ... it will terminate PURGER as soon as MPE gets around to sending the control-Y to the program. Of course, for faster control, hit BREAK and enter: ABORT UDC The following UDC allows purger to be run as though it is a built-in CI command: purger FILESET=" ", PARM=0 RUN PURGER.PUB.SIELER;INFO="!FILESET";PARM=!PARM COMMENT If FILESET is omitted, then PURGER will prompt for COMMENT input. Commands When run interactively, PURGER recognizes three commands. They are shown below, and may be abbreviated to just the uppercase portion: Exit ... terminates PURGER HELP ... displays this help text // ... terminates PURGER PURGER opens files with IN access so MPE XL will not try to scrub the disc clean before deallocating it. This is not a security hole because subsequent allocations of disc space scrub it anyway! The result is a much faster purge operation for large files on MPE XL. As of version 91B, PURGER can purge IMAGE databases as well as most other "privileged" files. 20140822