DLTOLDUSR DELETE OLD USER TAASEES |
The Delete Old User command checks user profiles and provides an
option to delete the profile if the user has not signed on for a
specified period of days. System provided profiles are never
deleted. User profiles without a password are never deleted. The
command provides a simple cleanup function for unused profiles.
You must have *ALLOBJ authority to use DLTOLDUSR.
See also the DSAOLDPRF command which will disable the profiles.
A typical DLTOLDUSR command would be entered as:
DLTOLDUSR OPTION(*PRTONLY) RETAINDAYS(180)
All user profiles would be checked. Any system provided profiles
would be bypassed. Any user profiles without a password would be
bypassed. An 'omit list' may be provided. All user profiles that
are not bypassed and have not signed on for 180 days would be listed.
A user profile that has never been signed onto and was created over
180 days ago would also be flagged.
After checking the listing, you could decide to delete those profiles
that are flagged with the same command or to delete them manually.
You may enter the same command with OPTION(*DELETE) and decide what
should become of the objects that are owned by the profiles being
deleted. The same options exist as on DLTUSRPRF.
DLTOLDUSR OPTION(*DELETE) RETAINDAYS(180)
OWNOBJOPT(*DLT)
The same listing would be output with a indication of which user
profiles were deleted and any errors that may have occurred.
Group profiles have some special considerations. See the GRPPROFILE
parameter.
DLTOLDUSR escape messages you can monitor for
---------------------------------------------
None. Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
OPTION The option to be used. *PRTONLY is the default and
does not cause any deletions. Only the listing is
produced of those user profiles that would be
deleted.
*DELETE may be specified to cause a deletion of any
user profile that has not been signed onto during
the RETAINDAYS period. System provided profiles are
never deleted. User profiles without a password are
never deleted.
RETAINDAYS The number of days to retain user profiles that have
not been signed on. The default is 365. A number
may be specified between 15 and 9999.
If a user has not signed on during the period
specified, the OPTION parameter determines what will
occur.
GRPPROFILE Whether to consider group profiles for deletion.
The default is *NO meaning that group profiles will
not be considered.
If *YES is specified, group profiles will be
considered for deletion. *YES is an appropriate
value if OPTION(*PRTONLY) is specified. This will
allow you to determine if any group profiles should
be deleted.
However, a group profile cannot be deleted until all
members of its group have been deleted. Because of
this, you may want the *PRTONLY option to determine
if any group profiles should be deleted and then
delete them manually.
If the same use of DLTOLDUSR will attempt to delete
all profiles belonging to a group and the group
profile, the naming sequence will determine whether
the group profile will be deleted.
If the group profile is attempted to be deleted
after all members of the group have been deleted,
the group profile will be deleted. If a member
still exists when the group profile is attempted to
be deleted, the attempted delete will fail with an
indication in the spooled file listing.
OWNOBJOPT The action to be taken if the user profile being
deleted owns objects. This is the same parameter as
exists on DLTUSRPRF. The default is *NODLT. If the
user owns objects, the DLTUSRPRF command will fail
and will be flagged on the listing.
*DLT may be specified to delete the objects.
*CHGOWN may be specified in which case a new owner
must be named in the second part of the parameter.
OMITLIST Up to 300 user profiles that should be omitted and
will not be considered for deletion. A generic name
may also be used. The default is *NONE.
Test instructions
-----------------
Test instructions are provided within the code (see the variable
&TAATST). In conjunction with user profiles named TAATSTUSRn, you
may create profiles and test the function. When &TAATST is set, the
TAATSTUSRn profiles are changed internally for their Create Date to
allow deletion.
Restrictions
------------
You must have *ALLOBJ authority to use DLTOLDUSR.
Prerequisites
-------------
The following TAA Tools must be on your system:
ADDDAT2 Add date 2
CHKALLOBJ Check *ALLOBJ special authority
CHKGENERC Check generic
CHKGENOBJ Check generic object
CHKIBMPRF Check IBM profile
EDTVAR Edit variable
EXTLST Extract list
EXTLST2 Extract list 2
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDSTSMSG Send status message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
DLTOLDUSR *CMD TAASEES QATTCMD
TAASEESC *PGM CLP TAASEESC QATTCL
TAASEESR *PGM RPG TAASEESR QATTRPG
|
Added to TAA Productivity tools November 15, 1999