TAA Tools
RTVILEMODA      RETRIEVE ILE MODULE ATTRIBUTES         TAAPGMQ

The Retrieve  ILE Module  Attributes command  retrieves the  attributes
for a  module of an  ILE program.   Either a module  number (default is
first) or a module name may be specified.

The API QBNLPGMI is used to retrieve the attributes.

A typical command would be:

             DCL          &MODULE *CHAR LEN(10)
              .
             RTVILEMODA   PGM(ABC) RTVNBR(1) MODULE(&MODULE)

The  module name of the first module  of the program would be returned.
Additional return variables  for such information  as the source  file,
library, and member may also be returned.

If the  information for all of  the modules should be  returned, a loop
is  needed in the  CL program.   The return value  TOTMOD will describe
the total number of modules that exist.

Escape messages you may be interested in monitoring for:

       - TAA9894    The RTVNBR number exceeds the modules in the pgm
       - TAA9895    The RTVMOD name module does not exist in the pgm
       - TAA9896    The program is not an ILE program

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

   PGM           The qualified program  to be  retrieved.  The  library
                 value defaults  to *LIBL.   *CURLIB may also  be used.
                 An ILE program must be specified.

   RTVNBR        The  number  of  the  module  to  be retrieved.    The
                 default is 1.   You  must specify either  a RTVNBR  or
                 RTVMOD.  RTVNBR(*NAME)  must be specified if  a module
                 name is used in the RTVMOD parameter.

   RTVMOD        The name  of the module to be  retrieved.  The default
                 is  *NONE meaning  the RTVNBR parameter  will be used.
                 *NONE  must be  used  if  a RTVNBR  value  other  than
                 *NAME is specified.

   RTNLIB        An  optional return  variable  that  will contain  the
                 library  name where the program was  found.  The value
                 may be helpful  if the program  is accessed without  a
                 specific  library name.   If  specified, the  variable
                 must be declared as *CHAR LEN(10).

   TOTMOD        An  optional  return variable  that  will  contain the
                 total  number  of   modules  in  the   program.     If
                 specified,  the  variable must  be  declared  as  *DEC
                 LEN(5 0).

   MODNBR        An  optional  return variable  that  will contain  the
                 number  of the module in the  program.  This value may
                 be of interest if  RTVMOD is used.  If  specified, the
                 variable must be declared as *DEC LEN(5 0).

   MODULE        An  optional return  variable  that  will contain  the
                 name  of the module.  If  specified, the variable must
                 be declared as *CHAR LEN(10).

   MODULEL       An optional  return  variable that  will  contain  the
                 name  of  the  module  library.    If  specified,  the
                 variable must be declared as *CHAR LEN(10).

   MODATR        An  optional  return variable  that  will  contain the
                 attribute of the module.   If specified, the  variable
                 must be declared as *CHAR LEN(10).

   CRTDAT        An  optional return  variable  that will  contain  the
                 date  the module  was created  in the  format CYYMMDD.
                 If  specified, the variable must  be declared as *CHAR
                 LEN(7).

   CRTTIME       An  optional return  variable  that will  contain  the
                 time  the module  was  created in  the format  HHMMSS.
                 If  specified, the variable must  be declared as *CHAR
                 LEN(6).

   SRCFILE       An optional  return  variable that  will  contain  the
                 source  file   used  to   create  the   module.     If
                 specified,  the  variable must  be  declared  as *CHAR
                 LEN(10).

   SRCLIB        An optional  return  variable that  will  contain  the
                 library  of  the  source  file   used  to  create  the
                 module.   If specified, the variable  must be declared
                 as *CHAR LEN(10).

   SRCMBR        An  optional  return  variable that  will  contain the
                 member of the source  file used to create the  module.
                 If specified,  the variable must be  declared as *CHAR
                 LEN(10).

   RLSCRTON      An  optional  return variable  that  will  contain the
                 release the module  was created  on.   The value  will
                 be  an  entry  such  as V3R6M0.    If  specified,  the
                 variable must be declared as *CHAR LEN(6).

   RLSCRTFOR     An  optional  return variable  that  will  contain the
                 release the  module  was created  for.   This  is  the
                 target  release of  the  module  and is  the  earliest
                 release the  module can run on.  The  value will be an
                 entry  such  as V3R6M0.    If specified,  the variable
                 must be declared as *CHAR LEN(6).

   SRCCHGDATE    An  optional return  variable  that will  contain  the
                 date  of  last update  of  the  source  member in  the
                 format  CYYMMDD.  If  specified, the  variable must be
                 declared as *CHAR LEN(7).

   SRCCHGTIME    An optional  return  variable that  will  contain  the
                 time  of  last update  of  the  source member  in  the
                 format  HHMMSS.   If specified,  the variable  must be
                 declared as *CHAR LEN(6).

   CCSID         An optional  return  variable that  will  contain  the
                 Coded Character Set  ID of the module.   If specified,
                 the variable must be declared as *DEC LEN(5 0).

   DEBUGDATA     An  optional   return  variable  that   will  describe
                 whether  the  module contains  debug  data.   Either a
                 *YES or  *NO  will be  returned.   If  specified,  the
                 variable must be declared as *CHAR LEN(4).

   MAXOPTLVL     An  optional return  variable  that  will contain  the
                 Maximum   Optimization  Level  of   the  module.    If
                 specified, the  variable  must  be  declared  as  *DEC
                 LEN(5 0).

                 The values  returned are  explained in  detail in  the
                 API  manual.   The brief  description  is 65535  = Not
                 restricted,  40   =   Maximum   level,   30   =   More
                 optimization is performed,  20 = Some  optimization is
                 performed,   10  =   No  additional   optimization  is
                 performed.

   CLSSQLCURS    An  optional  return  variable that  will  contain the
                 value  for  the  Close  SQL  Cursor   attribute.    If
                 specified,  the variable  must  be  declared as  *CHAR
                 LEN(10).

                 The  values  returned  are  *ENDMOD  (when the  module
                 ends),  *ENDACTGRP  (when  the  activation  group   is
                 deleted), or  blank (the module  does not  contain SQL
                 statements).

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

Because  the  command returns  values,  it may  only  be used  in  a CL
program.

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

The following TAA Tools must be on your system:

     CRTUSRSPC       Create user space
     EDTVAR          Edit variable
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   RTVILEMODA    *CMD                   TAAPGMQ       QATTCMD
   TAAPGMQC      *PGM       CLP         TAAPGMQC      QATTCL
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top