iTP Active Transaction Pages (iTP ATP) Programmer's Guide

DDL Dictionary Viewer (dview)
iTP Active Transaction Pages (iTP ATP) Programmer’s Guide522292-002
B-2
Choosing a DDL Dictionary
Choosing a DDL Dictionary
The first step in using dview is to enter the name of the DDL dictionary that defines
the message layouts for your application. In the text entry field, enter either of the
following:
The name of an OSS symbolic link to your dictionary subvolume. You use the OSS
ln command to create a symbolic link. The name is relative to the directory of the
current script (the directory where dview is installed) and must not start with a
period (.) or a slash (/).
The name of the Map Class Define that refers to the dictddf file in the DDL
dictionary subvolume. You use the MapDefine command in the httpd
configuration file to establish the define; see the ATP configuration-file fragment for
examples.
After you enter the name of your dictionary, click on the Set Dictionary button.
The Reset button clears the text entry field so you can specify a different dictionary.
Choosing a Message Layout
After choosing the dictionary, you see a screen that repeats the dictionary name you
specified, then lists all the message layouts defined in the dictionary. Click on the name
of the layout for the message you wish to create in your script.
Studying the Message Layout
The Message Layout Details screen lists all the fields and structures in the message you
selected. For each component of the message, it displays the nesting level (familiar from
COBOL: a higher level number means the component is nested in a component of the
next lower level) followed by the field or structure name, data type, COBOL type code,
offset, length, number of occurrences in the message, and number of decimal places.
The screen also displays field object constructors corresponding to the components of
the message.
Using the Field Object Constructors
Dview creates two sets of field-object constructors:
A function that has a name of the form def_message-layout creates a
hierarchy of new atp.field objects that represent the message and each of its
components. (Message-layout is the name of the layout you specified.) You can
cut and paste the def_message-layout function into your script to create the set
of objects. Alternatively, you can provide the field constructors individually as
arguments to the atp.buffer setData, getData, and setBinary methods
to set or retrieve information from the fields.