TAA Tools
DMOSUBF5        DEMO SUBFILE 5 (ARRAY/POS TO)          TAASTDF

The   Demonstrate   Subfile  5   (Array/PosTo)   command   provides   a
demonstration  of a subfile  loaded from array  data.  A  'Position To'
option  is supported.   The code provided includes  comments for how to
modify the source  to fit  your specific needs.   The subfile  provides
an option  to select one  of the entries  which causes the value  to be
passed back as a parameter.  A display option is also provided.

You can try out the function with the command:

            DMOSUBF5

To further exercise the demonstration:

         - Try the display option
         - Rollup/Rolldown
         - Select a value
         - Try the 'Position To' function
         - Try the Help key
         - End with F3 or F12 without making a selection

DMOSUBF5  is a  subset of  the DMOSUBF tool  with the  major difference
that array  data is  used to  load the  subfile rather  than data  base
records.   This  is  typical of  many applications  that  have a  small
number of  values that the user can select  from and a subfile provides
a good selection technique.

The intent of the  source is to  allow you to  build a similar  subfile
display application with a minimum of effort.

All  of  the screens  support  help  text.    The help  text  shown  is
standard  for things  like function  keys and  option entries.   Sample
formats are provided for field help text.

Differences with other DMOSUBF tools
------------------------------------

The  DMOSUBF tool  provides a  typical work  type display of  data base
records in a subfile.

The  DMOSUBF2   command  (part  of   DMOSUBF)  provides  display   only
functions  (no  changes  or  additions)  of  data  base  records  in  a
subfile.

DMOSUBF3  provides the same function  as DMOSUBF5, but does  not have a
'Position To' entry at the top of the display.

DMOSUBF4 provides the  same function as DMOSUBF3  except that a  window
is used.

DMOSUBF6 provides  the same function as  DMOSUBF4 plus a  'Position To'
entry.

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

Command  definition, CL,  DDS, and RPG  source are  provided.   You may
not want a command interface or a  CL program, but rather call the  RPG
program from  some other  program.   Or you  may decide to  use the  CL
program  only during  the testing  of the  code  and then  eliminate it
when integrating the RPG/DDS code into a full application.

The   DUPSTDSRC  command  provides  a  simple  method  of  copying  the
standard source.  The SRCTYP *SUBF5xxx must be used:

           *SUBF5CMD     Command definition source
           *SUBF5CLP     CL source
           *SUBF5RPG     RPG source
           *SUBF5DSPF    DDS Display file source

For example, to duplicate the RPG source, use:

           DUPSTDSRC   MBR(xxx) SRCTYP(*SUBF5RPG) TEXT('...')
                         SRCFILE(QRPGSRC)

For each source member that  you copy, some number of  required changes
are  needed.   Optional changes  may  also be  made.   The typical  use
would  be  to make  only  the required  changes and  achieve  a working
application before changing the optional statements.

As with DMOSUBF, the source  includes comments to assist you in  making
the changes.  There are 2 kinds of comments:

  **   Temporary.  These  are designed to assist you  in making changes
       to  the  source.   After  your  application  is  ready, you  may
       remove these comments with the RMVSRCCMT TAA Tool.

  **   Permanent.  These are designed to  be retained in the source  to
       document the code.

Array data
----------

The program is  written so that the array  data is part of  the program
(compile  time array).   It could be  loaded from  a file or  from your
own code at the beginning of the program.

The  program is  written so  that only a  value and  a text description
will appear in the  subfile and the same  values appear if a  record is
displayed.   You  may have  a  more complex  set of  information to  be
displayed in the subfile as well as more detail information.

The  program assumes that when an array  element is read from the ARVAL
array that  is blank, 'end  of file'  is sensed  and the  last page  of
entries is displayed.   You may have a different  method of determining
the 'end of file' and if so scan the RPG source for ENDFILE.

Instead of  array data, your data may  be in a data base  file.  If the
file contains a  small number  of records  (such as 100  or less),  you
may choose to use  DMOSUBF5 rather than DMOSUBF2 which  deals with data
base records.   For example, you  could read the data  at the beginning
of  the program  and place  it an array  or a  multiple occurrence data
structure.

Alternate View
--------------

The default in  the standard code  is to provide a  single view of  the
data (the Demonstration default allows an alternate view).

You may  specify an option  for an alternate  view by scanning  the RPG
code for ALTVW and use a SETON instead of a SETOF.

This  activates the F11 key  to allow a flip/flop  between the main and
alternate view.  The  F11 description is either  'View 1' or 'View  2'.
The  RPG ZZCVT  subroutine is  used for  converting both  the main  and
alternate view fields prior to display if needed.

Fields  for  the alternate  view should  be  entered in  DDS  (Scan for
ALTVW) and follow the instructions.

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

None

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

Only the first '1' option is used  to return a value.  If multiple  are
entered by the user, all those after the first are ignored.

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

The following TAA Tools must be on your system:

     ADJVAR          Adjust variable
     FILEFDBCK       File feedback
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   DMOSUBF5      *CMD                   TAASTDF       QATTCMD
   TAASTDFC      *PGM       CLP         TAASTDFC      QATTCL
   TAASTDFR      *PGM       RPG         TAASTDFR      QATTRPG
   TAASTDFD      *FILE      DSPF        TAASTDFD      QATTDDS
					

Added to TAA Productivity tools May 1, 1997


Home Page Up to Top