TAA Tools
BLDDBFOVR       BUILD DBF OVERRIDE                     TAADBIQ

The  Build Data  Base  File Override  tool  is a  program  that can  be
called  to provide an  OVRDBF command  ready to execute  using QCMDEXC.
The  values and  return command are  passed in  an externally described
data structure.   This  simplifies what  a program  has to  do for  the
typical application that processes a member list.

In order  to open  a series of  members in a  HLL program,  an override
command  is normally used in  the same program  that performs the open.
A sub CL program  cannot be used because  the override is removed  when
the  program  ends.    Consequently,  the  HLL  program  must  normally
generate  an override  command  and execute  using QCMDEXC.    This can
cause  some  complex  concatenation  statements.    Rather  than   this
approach,  the  tool  provides a  standard  program  that  returns  the
OVRDBF command ready to be executed.

Both  RPG III  and  RPG  IV code  are  provided, but  any  language may
interface to the supplied program.

You  may review the  fields in the  Externally Described Data Structure
with the command:

             DSPFMT        FILE(TAADBIQP)

The following  examples  show the  code to  read  a multi-member  file.
Only  some of  the fields  in the  Externally Described  Data Structure
have been used.

If  you have a small number  of members, use the  default of blanks for
OVLR (set LR status).   If you have a  large number of members,  better
performance can  be gained by  using OVLR =  *OFF until the  program is
no longer needed and then use *IMMED.

RPG III Code
------------

The following  RPG III code is  in a format to  be copied directly into
an RPG program and shows how the tool would be used.

     F* Your multi member file specified for UC (User controlled open)
     F*
     IOVRDS     E DSTAADBIQP
     C**************************************************************
     C*                                                            *
     C*    BLDDBFOVR  TAA Tool to build OVRDBF command             *
     C*       Insert your own values for OVxxx and other OV fields *
     C*                                                            *
     C**************************************************************
     C                     MOVE xxx       OVFILE           From file
     C                     MOVE xxx       OVTOF            To file
     C                     MOVE xxx       OVTOFL           To library
     C                     MOVE xxx       OVMBR            Member
     C                     MOVE '*YES'    OVSEC            Secure
     C                     CALL 'TAADBIQR'                 BLDDBFOVR
     C                     PARM           OVRDS            OVR DS
     C                     CALL 'QCMDEXC '                 QCMDEXC
     C                     PARM           OVRCMD           Ovr Cmd
     C                     PARM 256       LEN    155       Length
     C*
     C*   Your statements to Open the member, Read, Process, Close

RPG IV Code
-----------

The following RPG  IV code is in  a format to  be copied directly  into
an RPG program and shows how the tool would be used.

     F* Your multi member file specified for UC (User controlled open)
     F*
     D OVRDS         E DS                  EXTNAME(TAADBIQP)
     C**************************************************************
     C*                                                            *
     C*    BLDDBFOVR  TAA Tool to build OVRDBF command             *
     C*       Insert your own values for OVxxx and other OV fields *
     C*                                                            *
     C**************************************************************
     C                   EVAL      OVFILE = xxx
     C                   EVAL      OVTOF  = xxx
     C                   EVAL      OVTOFL = xxx
     C                   EVAL      OVMBR  = xxx
     C                   EVAL      OVSEC  = '*YES'
     C                   CALL      'TAADBIQR'
     C                   PARM                    OVRDS
     C                   CALL      'QCMDEXC '
     C                   PARM                    OVRCMD
     C                   PARM      256           LEN              15 5
     C*
     C*   Your statements to Open the member, Read, Process, Close

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

No command exists.

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

None.

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

The following TAA Tools must be on your system:

     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   TAADBIQR      *PGM       RPG         TAADBIQR      QATTRPG
   TAADBIQP      *FILE      PF          TAADBIQP      QATTDDS
					

Added to TAA Productivity tools August 1, 1998


Home Page Up to Top