TAA Tools
MODUSE          MODULE USE                             TAAMODC

The  Module Use  tool  allows  you  to capture  information  about  the
modules  in  ILE  programs or  service  programs.    A subfile  display
provides  a 'where used'  capability of what  programs contain the same
module.  A second subfile  display provides a simple review  of modules
by  program.   'Down  level'  situations where  an  object  form is  no
longer  current are  noted.   A separate print  command also  exists to
check for 'down level'.   You must  first convert the information  from
ILE *PGM and *SRVPGM objects.

Getting started
---------------

You  begin by  creating the  files that  will  be used  by the  various
Module  Use  commands.   Any  library may  be  named and  you  may have
multiple sets  of Module  Use files,  but only  one per  library.   The
library name WHRUSE will be used in these examples.

             CRTMODUSE     MODUSELIB(WHRUSE)

This creates the  physical file MODUSEP  and the logical  files MODUSEL
and MODUSEM.

You then  convert the information from *PGM and  *SRVPGM objects to the
WHRUSE  library.  You may name a  list of libraries containing *PGM and
*SRVPGM objects.

             CVTMODUSE    LIB(xxx yyy) MODUSELIB(WHRUSE)

The information  is provided thru  TAA Tools  which access system  data
using APIs.

Displaying the module information
---------------------------------

Two display commands are provided:

DSPMODUSE  displays a  subfile of  the  modules in  sequence by  module
name.

             DSPMODUSE     MODUSELIB(WHRUSE)

This  provides a 'where used'  capability.  If the  same module appears
in multiple programs, all of the using programs are shown.

DSPPGMMOD displays a  subfile of the  programs in name  order and  each
module is a separate subfile line.

             DSPPGMMOD     MODUSELIB(WHRUSE)

The same information  is available from the system  DSPPGM command, but
the  display  provides a  more  convenient method  of  reviewing module
usage.

The detail  display (Option  5) from  both DSPMODUSE  and DSPPGMMOD  is
similar.   The information about  the program  and module are  provided
such  as the  source member  used and  text  description if  the source
member exists.

Also  provided  is information  about the  dates  of creation  and last
source change  that  are  critical to  ensuring  that modules  are  not
'down level'.   Meaning  that the  source has been  changed and  one of
the object forms has an old version.

The following date and time fields are provided:

  **   Module  last source  change date.   The date  of last  change of
       the source  used  to  create  the module  when  the  module  was
       created.

  **   Module create date.

  **   Program create date.

  **   Current module  last source change date.   If the  module object
       exists,  this is  the date  of the last  source change  when the
       module was created.

  **   Current module create date if the module object exists.

  **   Source member last change date if the source member exists.

If one  of the  values is  not current,  the display  will appear  with
'Not current'  highlighted  next to  the value.   For  example, if  the
source  member has  been  changed since  the module  was  created, 'Not
current' will appear.

A  separate print  command (PRTMODUSE) prints  the modules  in order by
program and notes any 'down level' conditions.

Need for periodic refresh
-------------------------

The  information provided  is  only as  accurate  as  the last  use  of
CVTMODUSE.   The displays show the  last conversion date for  the first
record in the file.

A  time dependent batch job  to do CVTMODUSE on  a periodic basis would
be appropriate to keep the information reasonably current.

Basic use of modules
--------------------

The following describes some  basic uses of modules  and what you  will
see with  the Module Use  commands.   This is a  high level  summary of
the  basic  ILE functions.   You  may  also use  combinations  of these
basic functions.

  **   A single module  in a program.   This would be  the case if  you
       use  a  command  like  CRTBNDRPG  and  do   not  use  a  binding
       directory.   The  system  uses the  source to  compile  a module
       object and then creates a program with the module included.

       The  module object that  is created is temporary  only.  It will
       not exist when the command  completes.  The module is  'bound by
       copy' (hard bound) within the program.

       DSPMODUSE  will display  a  single record  with  the module  and
       program  information.  The module  object (separate object type)
       does not exist.

  **   A multiple module program where  CRTPGM is used and specifies  a
       list  of  module objects.    The  modules  are 'bound  by  copy'
       within  the program.   Re-creating  the  module object  does not
       change the 'bound by copy' version within the program.

       DSPMODUSE will display a record  for each module that is  'bound
       by copy'.  The  module object (separate object type)  may or may
       not  exist.   For example, if  you used  CRTPGM, you  could have
       deleted the module after creating the program.

  **   A   multiple  module   program  created   by  using   a  Binding
       Directory.   You would  pre-create  module object  types with  a
       command  like   CRTRPGMOD  and  add  the  names   to  a  Binding
       Directory.   CRTBNDRPG  program  could be  used with  the SRCMBR
       parameter naming  the  entry  module.    References  to  modules
       within  the  entry   module  would  be  found   in  the  binding
       directory  and the referenced  modules would be  'bound by copy'
       into the program.

       CRTPGM may also  use a  Binding Directory so  a similar  program
       could have been created with CRTPGM.

       DSPMODUSE  will  display  a record  for  each  'bound  by  copy'
       module in  a program.  The module  object (separate object type)
       would  not exist  for the  entry module  specified on CRTBNDRPG.
       The modules  found  in  the Binding  Directory  may or  may  not
       exist as separate  object types as they could  have been deleted
       after the program was created.

  **   A  Service Program  with  one or  more modules.   This  would be
       created from  the  CRTSRVPGM command  which  would name  one  or
       more existing  module objects.  The  modules would be  'bound by
       copy' within the Service Program.

       DSPMODUSE will  display one record for each  module found in the
       Service Program.    The  module  objects  must  exist  when  the
       Service Program  is created, but  could have been  deleted later
       on.

  **   A  program   references  a  Service  Program   using  a  Binding
       Directory.   In this case, the  program is dynamically linked at
       execution time to the modules within the Service Program.

       DSPMODUSE will  not show  any reference to  the Service  Program
       nor  the modules  within in.    You can  use Option  6 from  the
       subfile  display to  display  any Service  Program usage  of the
       program.

       If you capture the Service  Program with CVTMODUSE, the  modules
       within the Service Program can be seen.

Down level situations
---------------------

One  of the  purposes  of the  Module  Use tool  is  to  assist you  in
determining any 'down level' situations such as:

  **   The  source for  a module  has  changed and  the module  has not
       been re-created.

  **   The source for  a module has  changed and a  module object  does
       not  exist.   However,  the  module  is  'bound by  copy'  in  a
       program and the program should be updated.

  **   A module  object has been changed, but a  'bound by copy' use of
       the  module in a  program has a previous  version of the module.

Working with the Module Use Tool Commands
-----------------------------------------

The 3 basic  commands with  the Module Use  tool provide the  following
function:

   DSPPGMMOD     This  is  a simple  subfile  display  of Programs  and
                 Service  Programs.    The  records  appear  in program
                 order.   One  record  per  module that  is  'bound  by
                 copy'  within   the  program   is  displayed.     This
                 provides a simple review capability.

   DSPMODUSE     This  provides  a  'where  used'  capability.   It  is
                 intended  to  provide  an  answer  for  the   question
                 'Where is  Module  XXX used?'.   It  will  not show  a
                 link from  a *PGM object to a  module within a Service
                 Program.

   PRTMODUSE     This  provides  a  check for  'down  level' situations
                 where a  change  to some  source  has occurred  and  a
                 'bound  by copy' version  of the  module or  object is
                 down  level.   It  also checks  if an  existing module
                 object has  been changed  and versions  of the  module
                 which are  'bound by  copy' into  programs need to  be
                 changed.     It  allows   the  printing   of  just  an
                 exception list showing down level situations.

CRTMODUSE parameters                                  *CMD
--------------------

The  CRTMODUSE  command  creates  the  required  files  in  a  specific
library.

   MODUSELIB     The library  to  contain the  Module Use  files.   The
                 physical   file  (MODUSEP)   and  two   logical  files
                 (MODUSEL and MODUSEM) will be created.

   SRCLIB        The  source  library  to  use  for  the  QATTDDS  file
                 source.  The  default is *TAAARC.   If a full  license
                 exists, the source  is used from the TAA  Archive.  If
                 a  demonstration license  exists,  the source  is used
                 from the QATTDDS file in the TAATOOL library.

                 A specific user library may  be named, but the  source
                 file must be QATTDDS.

CVTMODUSE parameters                                  *CMD
--------------------

The CVTMODUSE  command converts the  module information from  *PGM (ILE
only)  and *SRVPGM  objects in  one  or more  libraries to  the MODUSEP
file.

   LIB           A list  of  up to  40  libraries containing  the  *PGM
                 (ILE  only) and  *SRVPGM objects  to  be accessed  for
                 module  information.   The special  values  *ALLUSR or
                 *USRLIBL  may be entered.   If *ALLUSR is entered, you
                 must have *ALLOBJ special authority.

   OBJTYPE       The  object  type  to  be  converted.    *ALL  is  the
                 default  meaning  both  *PGM  (ILE only)  and  *SRVPGM
                 object  types.     You  may  specify  either  *PGM  or
                 *SRVPGM if only one of the types are needed.

   MODUSELIB     The library  containing the  MODUSEP file.   *LIBL  is
                 the default.  *CURLIB may also be entered.

   REPLACE       A  *YES/*NO  value  that determines  if  any  existing
                 data  in the MODUSEP file  will be replaced.   *YES is
                 the default to replace the data.

                 *NO may  be specified  to add  to the  existing  data.
                 This  would be  useful if  you  have information  from
                 multiple  libraries to  be added  to the  same MODUSEP
                 file  and  do  not  enter  all  of  them  on  the  LIB
                 parameter.

   OMITLIBS      Up  to 40  libraries  to  be  omitted  if  *ALLUSR  or
                 *USRLIBL are used for the LIB parameter.

DSPMODUSE parameters                                  *CMD
--------------------

The  DSPMODUSE command  displays  a subfile  of  module information  in
module sequence.  This provides a 'where used' for modules.

   MODUSELIB     The  library containing  the MODUSEP  file.   *LIBL is
                 the default.  *CURLIB may also be entered.

DSPPGMMOD parameters                                  *CMD
--------------------

The DSPPGMMOD  command  displays a  subfile  of module  information  in
program sequence.   This provides a  simple display to  review programs
with modules.

   MODUSELIB     The  library containing  the MODUSEP  file.   *LIBL is
                 the default.  *CURLIB may also be entered.

PRTMODUSE parameters                                  *CMD
--------------------

The PRTMODUSE  command prints  a listing  of programs  and modules  and
notes exceptions such as  the source cannot be found or  the source has
been changed after the module or object was created.

   MODUSELIB     The  library containing  the MODUSEP  file.   *LIBL is
                 the default.  *CURLIB may also be entered.

   DETAIL        The  type  of  printing  to  occur.    The  default is
                 *EXCEPTIONS  to print  only  the exceptions  that  are
                 found.

                 *ALL  may  be specified  to  print  every program  and
                 module combination.

DLTMODUSE parameters                                  *CMD
--------------------

The  DLTMODUSE command deletes  the MODUSEP file  and dependent logical
files in a  named library.  The  command should only  be used when  the
information and files will no longer be used.

   MODUSELIB     The library containing the MODUSEP file.

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

None.

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

The following TAA Tools must be on your system:

     ADJVAR          Adjust variable
     CHKACTOBJ       Check active object
     TAAARC          TAA Archive
     CVTMODINF       Convert module information
     EXTLST2         Extract list 2
     FILEFDBCK       File feedback
     HLRMVMSG        HLL Remove message
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDDIAGMSG      Send diagnostic message
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message
     TAAEXC          TAAEXC program
     UPDPFILE        Update PFILE keyword

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

None, the tool is ready to use.

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

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

   CRTMODUSE     *CMD                   TAAMODC       QATTCMD
   DLTMODUSE     *CMD                   TAAMODC2      QATTCMD
   CVTMODUSE     *CMD                   TAAMODC3      QATTCMD
   DSPMODUSE     *CMD                   TAAMODC4      QATTCMD
   DSPPGMMOD     *CMD                   TAAMODC5      QATTCMD
   PRTMODUSE     *CMD                   TAAMODC6      QATTCMD
   TAAMODCC      *PGM       CLP         TAAMODCC      QATTCL
   TAAMODCC2     *PGM       CLP         TAAMODCC2     QATTCL
   TAAMODCC3     *PGM       CLP         TAAMODCC3     QATTCL
   TAAMODCC4     *PGM       CLP         TAAMODCC4     QATTCL
   TAAMODCC5     *PGM       CLP         TAAMODCC5     QATTCL
   TAAMODCC6     *PGM       CLP         TAAMODCC6     QATTCL
   TAAMODCC14    *PGM       CLP         TAAMODCC14    QATTCL
   TAAMODCR4     *PGM       RPG         TAAMODCR4     QATTRPG
   TAAMODCR5     *PGM       RPG         TAAMODCR5     QATTRPG
   TAAMODCR6     *PGM       RPG         TAAMODCR6     QATTRPG
   TAAMODCD      *FILE      DSPF        TAAMODCD      QATTDDS
   TAAMODCE      *FILE      DSPF        TAAMODCE      QATTDDS
   TAAMODCP      *FILE      PF          TAAMODCP      QATTDDS
   TAAMODCL      *FILE      LF          TAAMODCL      QATTDDS
   TAAMODCM      *FILE      LF          TAAMODCM      QATTDDS

Structure
---------

CRTMODUSE   Cmd
   TAAMODCC   CL pgm

DLTMODUSE   Cmd
   TAAMODCC2  CL pgm

CVTMODUSE   Cmd
   TAAMODCC3  CL pgm

DSPMODUSE   Cmd
   TAAMODCC4  CL pgm
     TAAMODCR4  RPG pgm
       TAAMODCC14  CL pgm
       TAAMODCD   Dsp file

DSPPGMMOD   Cmd
   TAAMODCC5  CL pgm
     TAAMODCR5  RPG pgm
       TAAMODCC14  CL pgm
       TAAMODCE   Dsp file

PRTMODUSE   Cmd
   TAAMODCC6  CL pgm
     TAAMODCR6  RPG pgm
       TAAMODCC14  CL pgm
					

Added to TAA Productivity tools January 1, 1999


Home Page Up to Top