TAA Tools
DLTOWNOBJ       DELETE OWNED OBJECTS                   TAAOBMX

The Delete Owned Objects  command allows an *ALLOBJ user  to delete the
objects  that are owned  by another profile.   The command  defaults to
ACTION(*CHECK)  to  allow  a  review  of  the  objects  that  would  be
deleted.  You  cannot delete objects owned  by a user profile  provided
by the system.

You must have *ALLOBJ special authority to use DLTOWNOBJ.

A typical command would be:

             DLTOWNOBJ USRPRF(USER1)

A  listing  would be  displayed  of all  the  objects  owned by  USER1.
After reviewing the listing you could delete the objects with:

             DLTOWNOBJ USRPRF(USER1) ACTION(*DELETE)

The  same listing  would be  displayed describing the  deleted objects.
If an object  is locked  or another error  occurs, it is  noted on  the
listing.

When ACTION(*DELETE)  is specified, the  code makes multiple  passes of
the  objects.  The  first pass deletes  most object types  such as such
as Logical files, data areas, job  descriptions, etc.  The second  pass
deletes  any Physical  files.    The  third pass  deletes  any  Library
objects.   The listing will describe  the objects in this  order with a
heading for each section.

An object cannot be deleted if it is locked.

A  library cannot be deleted if it  contains objects that are not owned
by the specified user profile.

DLTOWNOBJ escape messages you can monitor for
---------------------------------------------

      TAA9891    The command failed.  Occurs only if
                   run in batch or with OUTPUT(*PRINT)

Escape messages from based on functions will be re-sent.

DLTOWNOBJ Command parameters                          *CMD
----------------------------

   USRPRF        The user profile to delete objects for.

   OBJTYPE       The object type to  be deleted.  *ALL is  the default.
                 For a  list of the supported types,  use the prompter.

   ACTION        The action to be taken.

                 *CHECK  is  the  default meaning  no  objects  will be
                 deleted, but allows a review.

                 *DELETE may be specified to delete the objects.

   OUTPUT        How to  output  the results.    *  is the  default  to
                 display the  spooled file  if the  command is  entered
                 interactively.   If the  display is  ended with F3/F12
                 or the Enter  key, the spooled  file is deleted  after
                 it is  displayed.   To  retain the  spooled file,  you
                 may use  the the System Request  'Cancel' function and
                 the spooled file will exist in a HLD status.

                 If  the  command  is  entered in  batch  or  *PRINT is
                 specified, the  spooled file is  output and  retained.


Restrictions
------------

You must have *ALLOBJ special authority to use DLTOWNOBJ.

You cannot  use DLTOWNOBJ to delete  object owned by  a system provided
user profile.

An object cannot be deleted if it is locked.

A  library cannot be deleted if it  contains objects that are now owned
by the specified user profile.

Prerequisites
-------------

The following TAA Tools must be on your system:

     CHKALLOBJ       Check *ALLOBJ special authority
     CHKIBMPRF       Check IBM profile
     CHKOBJ3         Check object 3
     CVTOBJD6        Check object description 6
     RMVMSGKEY       Remove message key
     RSNLSTMSG       Resend last message
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   DLTOWNOBJ     *CMD                   TAAOBMX       QATTCMD
   TAAOBMXC      *PGM       CLP         TAAOBMXC      QATTCL
   TAAOBMXC2     *PGM       CLP         TAAOBMXC2     QATTCL
   TAAOBMXR      *PGM       RPG         TAAOBMXR      QATTRPG
					

Added to TAA Productivity tools April 15, 2013


Home Page Up to Top