RMVEFFLNK, remove IFS files by age
Use
With the command RMVEFFLNK any IFS files can be removed or archived. Either all files are removed, or only the files kept until a certain number of days. (Age of the file in days)
All data to be removed can be saved in an i-effect archive beforehand.
Parameters and their meaning
The command has the following parameters
Parameter | Value | Description | |
---|---|---|---|
IFSPATH | Qualified specification of the files to be removed You can also use DB2 paths to remove the contents of a library. For example /QSYS.LIB/EDIARCHIV.LIB | ||
Element 1 | IFS Path from which files must be removed | ||
Element 2 | File mask of the files to be removed. | ||
Element 3 | *YES | Subdirectories in the specified path are also examined. | |
*NO | Subdirectories in the specified path are not examined. | ||
OMIT | Names of files to be excluded during removal. | ||
LOG | *SELECT | Only files older than the number of days specified in the DAY parameter are removed | |
*ALL | All files are removed | ||
DAY | Age of files in days that must be reached for files to be deleted. Only valid in conjunction with parameter LOG(*SELECT) | ||
ARCHIV | *YES | Files are backed up to the archive specified in the ARCPATH parameter before removal. | |
*NO | Files are not backed up before removal. | ||
ARCPATH | Name of the archive file in which the data to be archived is stored and compressed. | ||
*PROMPT | The ADDARCHIVE command is prompted to specify the parameters for archiving |
Application example
Description | Command Parameters |
---|---|
Remove files older than 5 days from /tmp/mydir/ | RMVEFFLNK IFSPATH('/tmp/mydir' '*.*' '*YES) LOG(*SELECT) DAY(5) ARCHIV(*NO) |