The basic purpose of the application data structure is to define an
input/output area for use in transferring data between your application
program and GDDM. You include the application data structure declaration
created by GDDM-Interactive Map Definition (GDDM-IMD) in your application
to define the layout of one or more areas of storage. GDDM also keeps a
copy in its own storage of the data area associated with each mapped field
that you define, and it uses its copy to create the display that the
operator sees, and to record the changes made by the operator.
Your program modifies the GDDM data area by filling in values in its own
area, then passing the area to GDDM using an MSPUT call. It finds out the
values in the GDDM data area by using an MSGET call, which copies the GDDM
area into the program's data area. Usually, MSGET is used so that the
program gets access to the operator's input, though it can be used at
other times; for example, after MSDFLD, to initialize the program's data
area to the default values.
When you have finished the GDDM-IMD map-definition and generation
processes, you will not only have one or more generated mapgroups, but you
will also have an application data structure for each map. The data
structure and the fields that it defines depends on the selections made
during the map-definition process. Further information on this process is
given in the GDDM Interactive Map Definition book.
The application data area can be used for these purposes:
- Most of an application data structure is data fields, each data field
corresponding to a map-defined display field. You place into the data
fields the character data that you want to be displayed.
- You can position the cursor in a display field by setting the field's
cursor adjunct. By default, the cursor is placed under the first
character of the field, but you can change this by using the MSCPOS
call before you use MSPUT.
- Selector adjuncts provide additional control over, and information
about, a field's data value. You can selectively update a field,
reset a field to its map-defined default value, and determine whether
a field has been modified by the operator.
- Length Adjuncts show the length of the data in the field. If the data
in a field is shorter than the map-defined display field length, GDDM
pads the data with nulls when it displays the field. After operator
input the length adjunct is set to the number of characters provided
by the operator.
- Usually, field attributes are specified for the various fields on a
map during map definition. However, at run time the application
program can change these attributes by placing attribute values in
attribute adjunct fields in the application data structure. One or
more adjunct fields can be associated with a given data field in the
application data structure during map definition. Each attribute
adjunct controls a different type of attribute.
- Some devices allow different attributes to be applied to individual
characters in the same field. Character attributes are controlled
using a separate copy of the application data area. The data fields
in this copy contain the character attribute data instead of the
normal character data. Each character in the character attribute data
area determines the attributes of the corresponding character in the
normal application data area.
- The application program can be designed to allow detection (or
selection) of fields in a displayed panel by a light pen or, on some
devices, the Cursor Select (CURSR SEL) key. The type of detection
that occurs is determined by the first data character in the field;
this character is called a designator character.
- If specified in the map during map definition, GDDM edits input data
entered by the terminal operator. To process this edited input, you
need to know how GDDM presents it in the application data structure.
This topic gives valid settings and explanations of adjunct fields,
character attributes, and designator characters, and describes the format
of edited input. It also describes how to copy the application data
structure into the application program.
Subtopics:
|