TAA Tools
RTVDBR          RETRIEVE DATA BASE RELATIONS           TAADBJD

The  Retrieve  Data  Base  Relations  command  retrieves  the  list  of
dependent  files to  a  return variable.   Only  data  dependencies are
returned.   The  information is similar  to DSPDBR,  but operates using
the QDBLDBR API to produce faster results.

A typical series of commands would be:

             DCL        &DEPCNT *DEC LEN(5 0)
             DCL        &LST *CHAR LEN(9800)
             DCL        &ELEMENT *CHAR LEN(20)
             DCL        &DEPFIL *CHAR LEN(10)
             DCL        &DEPFILL *CHAR LEN(10)
              .
             RTVDBR     FILE(xxx) DEPCNT(&DEPCNT) LST(&LST)
             IF         (&DEPCNT *EQ 0) DO /* No dependencies */
                        /*****************************************/
                        /*                                       */
                        /*  Your processing for no dependencies  */
                        /*                                       */
                        /*****************************************/
             ENDDO      /* No dependencies */
             CHGVAR     &LX -19
 LOOP:       CHGVAR     &LX (&LX + 20)
             IF         (&LX *LT 9800) DO /* LT Max */
             CHGVAR     &ELEMENT %SST(&LST &LX 20)
             IF         (&ELEMENT *NE ' ') DO /* Some value */
             CHGVAR     &DEPFIL %SST(&ELEMENT 1 10)
             CHGVAR     &DEPFILL %SST(&ELEMENT 11 10)
                        /*****************************************/
                        /*                                       */
                        /*   Your processing of dependent files  */
                        /*      Only data dependencies exist     */
                        /*                                       */
                        /*****************************************/
             GOTO       LOOP
             ENDDO      /* Some value */
             ENDDO      /* LT Max */

The QDBLDBR API is used.

A maximum of 490 dependencies may be returned.

RTVDBR escape messages you can monitor for
------------------------------------------

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

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

   FILE          The  qualified  name  of  the  file  to  retrieve  the
                 dependencies   for.     Only  data   dependencies  are
                 returned  (dependent  logical  files).    The  library
                 value defaults to  *LIBL.  *CURLIB  may also be  used.

   DEPCNT        The  number of  dependencies.    This is  an  optional
                 return value.   If used, it must  be specified as *DEC
                 LEN(5 0).

                 If more than 490  dependencies exist, this value  will
                 be correct,  but the LST  parameter only has  room for
                 the first 490.

   LST           The  list  of  dependencies.    This  is  an  optional
                 return  value.    If  used, it  must  be  specified as
                 *CHAR LEN(9800).

                 Each element  is 20  bytes and is  is made  up of  the
                 dependent  file  in  positions   1-10,  and  the  file
                 library in positions 11-20.

                 A  maximum of  490 dependencies  may be returned.   If
                 less  than  490  dependencies  exist,  the   remaining
                 space will be blank.

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

A maximum of 490 dependencies may be returned.

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

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

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     SNDESCMSG       Send escape message
     TAAEXC          TAA Execute

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

None, the tool is ready to use.

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

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

   RTVDBR        *CMD                   TAADBJD       QATTCMD
   TAADBJDC      *PGM       CLP         TAADBJDC      QATTCL
   TAADBJDR      *PGM       RPG         TAADBJDR      QATTRPG
					

Added to TAA Productivity tools February 28, 2000


Home Page Up to Top