TAA Tools
DMOSUBF7        DEMO SUBFILE 7 (ARRAY from SQL)        TAASTDD

The  Demonstrate  Subfile  7  (Array  from   SQL)  command  provides  a
demonstration  of  a  subfile populated  from  an  array  built from  a
single  SQL call.   The  code provided includes  all the  members for a
basic subfile  program.  To  use, the  user would copy  the demo  parts
into their own  development library and change the  parts as needed for
their own application or program.

The  intent of this source is  to allow you to  build a similar subfile
display application  with a  minimum of  effort.   See Getting  Started
section below for implementation details.

You can try out the function with the command:

            DMOSUBF3

To further exercise the demonstration:

         - Select a value (Option 1) -
            (the value is passed back to the caller as a parameter)
         - Display a value (Option 5)
         - Rollup/Rolldown
         - Try the Help key (F1)
         - End with F3 or F12 without making a selection

DMOSUBF7  is   a  variation   of  the  DMOSUBF   tool,  but   with  key
differences: -  array data is built from a single  SQL call to load the
subfile -  display  file  indicators  have  logical  names  in  a  data
structure,  making them  easy  to use  and  understand -  display  file
access is  done through a  set of procedures  without global variables,
simplifying   code  maintenance   -  the  application   function  is  a
stateless procedure call (an  API) which allows the same routine  to be
used  with  different  user  interfaces,  i.e.   green  screen,  a  web
service call, a web page, etc.

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

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

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

DMOSUBF3 uses  array data  to load  the subfile  rather than data  base
records.

DMOSUBF4  provides  the same  function  as DMOSUBF3,  but  the  data is
displayed in a window on the display.

DMOSUBF5 is like DMOSUBF3 plus a 'Position To' entry.

DMOSUBF6 is like DMOSUBF4 plus a 'Position To' entry.

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

Copy the  demo  source  -  copy the  source  to  your  own  development
library: CPYTAA2 TOOL(DMOSUBF7) TOLIB(yourLib)

Change the SQL  call to retrieve your  data TAASTDJR2 - change  the SQL
call to select the table and columns you wish.

Change  the columns  to  display Decide  which data  columns  you would
like  to populate the subfile with  and change these parts accordingly:
TAASTDJR - change the DetailRecord fields to display

Change the  calling method  This demo is  run by  calling the  DMOSUBF7
command.   Once you customize the  source and get it  working with your
data,  you  may  want  to change  the  code  to  call  the RPG  program
directly from your application.

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:

     CRTTAAPRX       Create TAA proxyc
     FILEFDBCK       File feedback
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   DMOSUBF7      *CMD                   TAASTDJ       QATTCMD
   TAASTDJC      *PGM       CLP         TAASTDJC      QATTCL
   TAASTDJB      *PGM       CLP         TAASTDJB      QATTCL
   TAASTDJD      *FILE      DSPF        TAASTDJD      QATTDDS
   TAASTDJI2     *PGM       RPGLE       TAASTDJI2     QATTRPG
   TAASTDJR      *PGM       RPGLE       TAASTDJR      QATTRPG
   TAASTDJR2     *PGM       SQLRPGLE    TAASTDJR2     QATTRPG
   TAASTDJP      *PF        SQL         TAASTDJS      QATTSQL
					

Added to TAA Productivity tools November 15, 2016


Home Page Up to Top