iTP Active Transaction Pages (iTP ATP) Programmer's Guide
ATP Objects, Properties, and Methods
iTP Active Transaction Pages (iTP ATP) Programmer’s Guide—522292-002
4-27
atp.field Object
atp.field Object
The field object describes a data field within an application message. The data field can
be an elementary or group (structured) field with up to 49 levels of nesting.
Constructor
new atp.field (name, level, type, structure, offset, length, decimals,
bit_offset, bit_length, subscript_multipliers, occurs_max)
An atp.dictionary object automatically creates atp.field objects. You can
also construct an atp.field object explicitly, for example with the statement
new atp.field('total_salary',1,'Binary 32
unsigned',5,98,4,2,0,0, new Array(0,0,0,0,0,0,0),1)
Using the atp.dictionary object to generate the atp.field objects is easier and
less error-prone than creating atp.field objects explicitly. You can also use the
dview example application program to create atp.field objects, as described in
atp.dictionary Object Usage Considerations on page 4-26.
name
This parameter specifies the name of the field.
level
This parameter indicates the level at which the field exists in the application-
message structure. The level is between 0 and 48.
type
This parameter contains text identifying the data representation of the field within
the application-message buffer. The Description column in Table 4-4
on page 4-30
lists the text for each type.
structure
This parameter contains a number identifying the data representation of the field
within the application-message buffer. The numbers are the same as those used
within the DDL dictionary dictobl file. Table 4-4 on page 4-30 lists the supported
data types.
offset
This parameter contains a number representing the byte offset of the field within the
application-message buffer. For subscripted items, the value is the offset of the first
instance. The first field has an offset of zero.
length
This parameter gives the length (in bytes) of the field within the application-
message buffer.