TAA Tools
MRGOBJ          MERGE OBJECTS                          TAALIBU

The Merge  Objects command  is intended  for the case  where you  batch
the changes  that are to go  into production.  The  command handles the
merging  in of normal objects, data  base networks, and source members.
Either new  or  replacement objects/members  are  handled.   An  option
exists to  retain or replace the  production data.  The  command can be
used on the same system or a remote system.

The  RPLDUPOBJ  tool provides  a  command  that may  be  considered for
simple use.

The MRGOBJ  command is  intended to  work with  the  DUPCHGOBJ tool  or
your  own function  to  place the  new object  versions  in a  separate
library  before merging them  into production.   The concept  of MRGOBJ
can be used in maintaining an application:

  **   On  the  same  system  (for  example,  you  have  a  development

  **   On another system or systems in the same machine room.

  **   On remote systems.

For  example, assume  you have  a  standard application  that  is on  a
development  system and  remote systems.   Changes need  to be  made in
certain  objects.    After  testing  the  changes  on  the  development
system,  you would  first  use  the  DUPCHGOBJ tool  to  duplicate  the
changed objects  from the production library on  the development system
to a 'transfer' library.


You  would  then  transfer  the library  to  the  remote  system either
electronically or using save/restore.

On the remote system, you would use MRGOBJ as:

             MRGOBJ      FROMLIB(TFR) TOLIB(PROD1)

The command does the following:

  **   Replaces any  data base  files.   By default,  any  data in  the
       corresponding  To  library   is  copied  to  the   From  library
       version.   An  option exists to  use the  From library  data for
       specific files.

  **   If any source files  exist in the From  library that also  exist
       in the To library,  the members are copied to  the corresponding
       file in  the To library.   If a  From member has  0 records, the
       member  is not copied  and an error  is noted.   The From source
       file is then deleted.

  **   If a source file exists in  the From library, but not in  the To
       library,  the  source  file  is  created  and  the  members  are
       copied.  The From source file is then deleted.

  **   Each  of  the remaining  objects  in  the From  library  is then
       check  to see  if  a  corresponding  object  exists  in  the  To
       library.   If so, the  To object is  deleted.  The  From library
       object is then moved to the To library.

A  spooled  file  is created  with  the  detail  information about  the
source and objects that have been merged into the To library.

It is  assumed that  the  user running  the  command is  authorized  to
perform the deletes  and moves.   If not, error conditions  will occur.

Error handling

If  an  error occurs  while  attempting  to delete  a  logical file  or
process  source,  an  escape  message  is  sent  and  the  command ends
immediately.  The spooled  file will contain the object or  member that
has  caused the  problem  and the  job  log may  need  to be  examined.
After  correcting the problem, the MRGOBJ  command should be run again.

If an  error occurs  during the  deletion and  moving  of objects,  the
command  will in  most cases  continue and  report the  error when  the
command completes.  Manual correction would normally be used.

Command parameters                                    *CMD

   FROMLIB       The library  containing the objects to  be merged into
                 the To library.

                 For data  base data  files, the  physical and  logical
                 files are  moved to the  new library.   Existing files
                 are  deleted.  By  default, the  data in  the physical
                 files  to  be  replaced  is copied  to  the  From file
                 first.  See also the FRMFILDATA parameter.

                 For   source   files,    the   members   are    copied
                 individually   rather   than  replacing   the   entire
                 object.   This  allows a subset  of the  members to be

                 For all  other objects,  any corresponding  To  object
                 will be  deleted and  the new object  moved to  the To

   TOLIB         The library where the objects should be moved to.

   FRMFILDATA    A  list of up  to 40 files  in the From  Library where
                 the data in  the From Library  should be used  instead
                 of any existing data  in the To Library file.   If the
                 corresponding file  does not exist in  the To Library,
                 the file need not be described.


The  user  of the  object must  be authorized  to  the the  objects and
libraries so that delete and move operations may be performed.


The following TAA Tools must be on your system:

     DLTOBJ2         Delete object 2
     EXTLST          Extract list
     RTVDBFA         Retrieve data base file attributes
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDDIAGMSG      Send diagnostic message
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message


None, the tool is ready to use.

Objects used by the tool

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

   MRGOBJ        *CMD                   TAALIBU       QATTCMD
   TAALIBUC      *PGM       CLP         TAALIBUC      QATTCL
   TAALIBUC2     *PGM       CLP         TAALIBUC2     QATTCL
   TAALIBUC3     *PGM       CLP         TAALIBUC3     QATTCL
   TAALIBUC4     *PGM       CLP         TAALIBUC4     QATTCL
   TAALIBUC4     *PGM       CLP         TAALIBUC5     QATTCL
   TAALIBUR      *PGM       RPG         TAALIBUR      QATTRPG

Added to TAA Productivity tools May 1, 1996

Home Page Up to Top