Parent Items and Child Items [ HP Transact Reference Manual ] MPE/iX 5.0 Documentation
HP Transact Reference Manual
Parent Items and Child Items
A single data item can contain other data items, called child items. A
data item containing child items is called a parent item. For example, a
data item containing a date can be composed of three child items: month,
day, and year, in any order you choose. A child item itself can be a
parent item, and it can contain child items. In this case, it would be
both a child item and a parent item.
You define the relationship of a child to its parent by including, in the
child item's definition, the parent item's name and the position of the
child item within the parent item. Child items need not be of the same
type as parent items. A parent item need not be completely redefined by
its child items. For example, a parent item that is 10 characters long
may have a single child item that is 4 characters long starting in the
second character position of the parent item. Refer to the DEFINE(ITEM)
description in Chapter 8 for details about defining parent and child
items.
Only the parent item name can be added to the list register; the child
item names cannot. Child item names may, however, be used in a PROMPT or
DATA statement to prompt the user for these values. Child items may also
be specified in the LIST= options of statements that access VPLUS forms.
Transact understands that these data item names are part of the parent
item, and transfers the data accordingly. Transact makes the connection
between parent and child items through the DEFINE(ITEM) or a data
dictionary definition of their relation. This parent/child relationship
can be resolved from a data dictionary only at compile time, not at run
time. The child items can be the elements of an array, which is the
parent item.
MPE/iX 5.0 Documentation