The Delete IFS Directory command optionally deletes a directory and
all sub items within the directory including other directories. The
default is 'check' which produces a listing of what would be deleted
and any errors such as 'not authorized to delete'. Several
catastrophic operations are prevented such as deleting the root
('/'), /QDLS, and /QSYS/LIB.
The user of DLTIFSDIR must be authorized to the TAACVTIFS
authorization list and any objects to be deleted.
A typical command would be:
DLTIFSDIR OBJ(xxxx) ACTION(*CHECK)
The object described must be a directory (*DIR). The objects within
the directory are found including any sub-directories and a 'tree' is
created with all directories and stream files.
In the example ACTION(*CHECK) was specified. Only a listing is
produced of what would be deleted and any problems (such as a lack of
authorization) are noted.
If after you have reviewed the listing and want to delete the same
DLTIFSDIR OBJ(xxxx) ACTION(*DLT)
ACTION(*CHECK) builds the IFSDIRT file and the DLTIFSDIR *USRSPC
object in QTEMP. This makes it faster for the deletes to occur if
the same directory when ACTION(*DLT) is specified.
ACTION(*DLT) may be specified at any time and DLTIFSDIR would attempt
to delete the objects beginning at the bottom of the tree and working
up toward the top directory.
If an object cannot be deleted because of lack of authorization or
other problems, the parent directory cannot be deleted. DLTIFSDIR
will delete what it can. A listing is created with the action taken.
If the specified directory cannot be deleted (such as not
authorized), no listing occurs.
Following the use of ACTION(*DLT), the IFSDIRT file and DLTIFSDIR
*USRSPC objects are deleted from QTEMP.
DLTIFS vs DLTIFSDIR
The DLTIFS command can be used to delete one or more objects, but
cannot be used to delete a directory that contains objects.
** Only a directory (*DIR) object may be named for the DIR
** Only *DIR and stream files (*STMF) are deleted (*DDIR object
types are not).
** The user of DLTIFSDIR must have *OBJEXIST rights to the
objects to be deleted.
** The following directory names are rejected:
Sub directories within these directories can be
** Any objects owned by QSYS, QLPINSTALL, or QLPAUTO cannot be
** Objects which have been 'checked out' cannot be deleted.
** Remote objects cannot be be deleted.
DLTIFSDIR escape messages you can monitor for
TAA9891 Errors have occurred.
Escape messages from based on functions will be re-sent.
Command parameters *CMD
DIR The path name of the directory to be deleted. Any
sub-directories and the objects within them will
also be deleted.
ACTION The action to be performed. The default is *CHECK
which produces a listing of what would be deleted.
*CHECK creates the IFSDIRT file and the DLTIFSDIR
*USRSPC in QTEMP. These objects are used if *DLT is
specified for the same directory.
*DLT may be specified at any time to delete objects.
No prior *CHECK function need be run. If errors
occur, DLTIFSDIR deletes what it can. However, a
directory cannot be deleted if a sub item has not
been deleted. A listing is produced of the action
USRPRF The user profile that will be switched to during run
time only during the running of CVTIFS. CVTIFS is
run during the internal processing of DLTIFSDIR.
QSECOFR is the default for USRPRF. For file systems
(such as QNTC), CVTIFS will fail if QSECOFR does not
*CURRENT may be used or a specific user profile, but
the profile must have *ALLOBJ special authority.
The user profile entered is only used while CVTIFS
See previous comments
The following TAA Tools must be on your system:
CHKIFSE Check IFS entry
CHKSPCAUT Check special authority
CHGUSRSPC Change user space
CLRUSRSPC Clear user space
CRTUSRSPC Create user space
CVTDAT Convert date
CVTIFS Convert IFS
EDTVAR Edit variable
RTVIFSED Check IFS entry
RTVUSRSPC Retrieve user space
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCINF Send escape information
SNDESCMSG Send escape message
TRNVAL Translate value
None, the tool is ready to use.
Objects used by the tool
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
DLTIFSDIR *CMD TAAIFTA QATTCMD
TAAIFTAC *PGM CLP TAAIFTAC QATTCL
TAAIFTAC2 *PGM CLP TAAIFTAC2 QATTCL
TAAIFTAR *PGM RPGLE TAAIFTAR QATTRPG