TAA Tools
MRGUSRPRF       MERGE USER PROFILE                     TAASEEV

The Merge User  Profile command allows for  the case where you  want to
transfer  ownership, authorizations, etc  of one  user to  another user
profile.   Owned  objects, authorizations, spooled  files, names within
Job Descriptions, and  names within Job  Schedule entries are  changed.
If  successful, the  From user  profile is  deleted.   The  name within
user data or TAA objects is not changed.

You  must have  *ALLOBJ,  *SECADM, and  *JOBCTL special  authorities to
use MRGUSRPRF.    The user  must not  have  any active  interactive  or
batch jobs.

Assume that  user JONES is  taking a new job  and the functions  are to
be  transferred  to the  existing user  SMITH.   Merging  can  occur by
specifying:

             MRGUSRPRF   FRMUSRPRF(JONES) TOUSRPRF(SMITH)

The command would do the following:

  **   Any objects  owned by  JONES would  be changed  to SMITH.    The
       system CHGOBJOWN  command is used.   An  exception is the  JONES
       *MSGQ  object in QUSRSYS.   The  system automatically  creates a
       message  queue of the same name as  the user profile when a user
       profile  is created.    This  message  queue is  deleted  if  it
       exists.

  **   Any existing  authorizations granted  to JONES would  be granted
       to  SMITH.   For  example,  if JONES  had been  authorized  to a
       file, at least  the same authorizations  would exist for  SMITH.
       This occurs by  accessing the existing authorities  for the From
       user,  using the system  GRTOBJAUT command  for the To  user and
       RVKOBJAUT for the  From user.   Authorizations to  Authorization
       Lists are also accounted for.

       If both users  were authorized to  an object, the  new authority
       is  a  combination of  existing  authorities.   For  example, if
       JONES  had  Read authority  and SMITH  had Add  authority, SMITH
       would now have both Read and Add authority.

       If the From  user had  *EXCLUDE to an  object, the authority  is
       dropped  and the  condition  is  flagged on  the  listing.   For
       example,  if JONES is  *EXCLUDE, any authorities  that SMITH has
       to object will not be changed.

       Authorizations  to IFS  object  types  such  as  *STMF  are  not
       transferred.    If   the  user  profile  is   deleted,  the  IFS
       authorizations are deleted.

  **   Any  Job Descriptions  that contain  the From  user name  in the
       USER parameter would  be changed  to the  To user.   The  system
       CHGJOBD command is used.

  **   Any Job  Schedule entries  that contain  the From  user name  in
       the USER  parameter would be changed  to the To user  name.  The
       system CHGJOBSCDE command is used.

  **   Any  existing  spooled files  owned by  the  From user  would be
       changed to  the To user.   An  option exists  to not change  the
       ownership  (see the  SPLF  parameter).   Changing  of the  owner
       occurs  by use of the TAA DUPSPLF  command and specifying the To
       user name  as the  owner.   The  new spooled  file will  have  a
       different date  and time  (file open  date and  time).  The  old
       spooled file is deleted.

  **   Any directory  entries for the From user  would be deleted.  The
       directory entries for the To user would remain the same.

  **   Any user profile  attributes are  not merged.   For example,  if
       the From  User has  *JOBCTL special  authority and  the To  user
       does not, the To user profile is not changed.

  **   If no errors occur, the From user profile is deleted.

A spooled  file is created which includes all  of the changes that have
occurred  as well  as any  exceptions.   For example,  if an  object is
locked, the change of  owner or granting and revoking  authorities will
fail.

Excess spooled files
--------------------

If the From  user owns a large number of  spooled files, MRGUSRPRF will
take a  long time.  You can use WRKSPLF  to determine this.  If a large
number of spooled files  exists and are  not needed, use DLTOLDSPLF  to
delete them first.

Restart capability
------------------

MRGUSRPRF allows  a restart  capability.  If  you correct  the problems
(or wait until the locks are available), just re-enter the command.

MRGUSRPRF escape messages you can monitor for
---------------------------------------------

      TAA9892    The user has active jobs.
      TAA9893    A failure occurred - See spooled file.

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

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

   FRMUSRPRF     The name  of the From user profile  to merge from.  If
                 the  merge  is   successful,  the   user  profile   is
                 deleted.

   TOUSRPRF      The name  of the To  user profile  that will be  added
                 to for owned objects, authorities, etc.

   SPLF          A  *YES/*NO   parameter  for  whether   spooled  files
                 should  be transferred  to the To  user.   *YES is the
                 default.    This   causes  the  spooled  file   to  be
                 duplicated so  the To user  can be established  as the
                 owner.    The  date  and  time  of  the  open will  be
                 changed  when  the  duplication   occurs.    The   old
                 spooled file is deleted.

                 *NO  may be  specified  to  not transfer  the  spooled
                 files.    If  you  need  to  maintain the  information
                 about when  the  spooled file  was  actually  created,
                 use *NO.

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

You must  have  both *ALLOBJ  and *SECADM  special  authorities to  use
MRGUSRPRF.

The From user must not have any active jobs.

Any *EXCLUDE  authorities for the From user are  dropped and flagged in
the listing.

Use  of the From user  name within user or  TAA objects is not changed.
For example, if a user data file exists with the From user name.

Any user profile attributes are  not merged.  For example, if  the From
User has  *JOBCTL special authority  and the To  user does not,  the To
user profile is not changed.

       Authorizations  to  IFS  object  types  such  as  *STMF are  not
       transferred.    If  the  user   profile  is  deleted,  the   IFS
       authorizations are deleted.

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

The following TAA Tools must be on your system:

     CHKACTUSR       Check active user
     CHKALLOBJ       Check *ALLOBJ special authority
     CVTJOBSCDE      Convert job schedule entries
     CVTWRKSPLF      Convert work spooled file
     DUPSPLF         Duplicate spooled file
     FMTLIN          Format line
     RTVJOBD         Retrieve job description
     RTVSPCAUT       Retrieve special authorities
     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
   ------        ----    ---------      ----------    ----------

   MRGUSRPRF     *CMD                   TAASEEV       QATTCMD
   TAASEEVC      *PGM       CLP         TAASEEVC      QATTCL
   TAASEEVC11    *PGM       CLP         TAASEEVC11    QATTCL
   TAASEEVC12    *PGM       CLP         TAASEEVC12    QATTCL
   TAASEEVC13    *PGM       CLP         TAASEEVC13    QATTCL
   TAASEEVC14    *PGM       CLP         TAASEEVC14    QATTCL
   TAASEEVC16    *PGM       CLP         TAASEEVC16    QATTCL
   TAASEEVR      *PGM       RPG         TAASEEVR      QATTRPG

Sub CL programs used
--------------------

TAASEEVC is  the CPP.   It  prints the final  set of  information using
the  TAASEEVR RPG program.   The following  CL programs are  called and
each uses TAASEEUR also:

     TAASEEVC11  CL pgm  - Changes owned objects
     TAASEEVC12  CL pgm  - Does GRTOBJAUT and RVKOBJAUT
     TAASEEVC13  CL pgm  - Changes USER parameter of JOBDs
     TAASEEVC14  CL pgm  - Changes owner of spooled file using DUPSPLF
     TAASEEVC16  CL pgm  - Changes job schedule entries if any
					

Added to TAA Productivity tools February 1, 2001


Home Page Up to Top