The Demonstrate Subfile 6 (Window/Position To) command provides a
demonstration of a subfile loaded from array data that will appear in
a window. A 'Position To' entry exists. 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:
DMOSUBF6
To further exercise the demonstration:
- Try the display option
- Rollup/Rolldown
- Try the Position To entry
- Display an entry
- Try the Help key
DMOSUBF6 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. DMOSUBF6 is similar to DMOSUBF4 except that a Position To
entry is supported. Comments exist within the source to assist you
in re-positioning the window or changing the size of the window.
A window of array data is typical of many applications that have a
small number of values that the user can see.
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 DMOSUBF4, but the data is
displayed on a full display. DMOSUBF4 uses a window.
DMOSUBF4 provides the same function as DMOSUBF6 except that the
'Position To' entry is not supported.
DMOSUBF5 is like DMOSUBF3 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 *SUBF6xxx must be used:
*SUBF6CMD Command definition source
*SUBF6CLP CL source
*SUBF6RPG RPG source
*SUBF6DSPF DDS Display file source
For example, to duplicate the RPG source, use:
DUPSTDSRC MBR(xxx) SRCTYP(*SUBF6RPG) 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.
Comments within the source will assist you in making changes.
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 DMOSUBF6 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 arrays or multiple occurrence data
structures.
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
------ ---- --------- ---------- ----------
DMOSUBF6 *CMD TAASTDG QATTCMD
TAASTDGC *PGM CLP TAASTDGC QATTCL
TAASTDGR *PGM RPG TAASTDGR QATTRPG
TAASTDGD *FILE DSPF TAASTDGD QATTDDS
|