ITEM data type

An ITEM data type indicates that the data is a data item identified by a class name. For the item data type, the class name is stored after the data header. The item data itself (that is, the class of data for all sections of a program object) follows the class name.

Figure 1 shows the structure of the item data record. The data header is mapped by the TFMT_TDITEM section in the IEWTFMT macro and is shown in Table 1.

The data item that follows the class field is mapped by one of the mapping macros described in Binder API buffer formats. The applicable map is determined by the class name. For example, if the class name is "B_RLD", the corresponding map is structure IEWBRLD described in Figure 1.

The meaning of some fields in the header structures described in Binder API buffer formats is changed to fit the context of a record rather than an in-storage buffer. These changes apply to the header fields listed below. Replace "xxx" with a data class identifier (ESD, RLD, IDB, …).
xxxH_BUFFER_LENG
Actual length of the item data including header
xxxH_ENTRY_COUNT
Actual number of entries in the record
xxxH_NAMEPTR_ADJ
Negative adjustment factor to add to name pointers. The pointers then become offsets from the first byte of the buffer header (for example, IEWBESD, or IEWBRLD). In the context of the item record, the offsets are relative to the beginning of the item data. See Figure 1.
Figure 1. Item data recordieab2t06
Table 1. Transportable program item data header
Name Description
TFMT_TDITEM DSECT   Maps item data header
TFMT_TDITEM_EYE DS CL8 Data record identifier. Contains string 'IEWTITEM'
TFMT_TDITEM_LVL DS FL1 Level number: 1
TFMT_TDITEM_BUFF_LVL DS FL1 Version of the data buffer that follows this header
TFMT_TDITEM_RS1 DS CL2 Reserved
TFMT_TDITEM_LEN DS FL4 Data record length including the varying data
TFMT_TDITEM_CSR DS FL4 Cursor number. Indicates the relationship of data in this data record relative to the previous item data record
TFMT_TDITEM_CNT DS FL4 Indicates how many bytes/records of binder data are saved after this header.
TFMT_TDITEM_OFF DS FL2 Offset to the item data relative to the beginning of TFMT_TDITEM
TFMT_TDITEM_RS2 DS CL2 Reserved
Note: The varying item data is stored immediately after the item data header. The varying item data has the format:
  Class name length  +  Class name  + Item data length + Item data
     (2 bytes)           (varying)       (2 bytes)       (varying)