Inline data

BYTE or TEXT data that is included as part of a fixed-format data file is called inline data. When byte or text data is inline, the data-file record has two parts: a fixed-length part and a variable-length part.

For example, a record with two fields and byte or text data might be organized as follows.
Figure 1. Organization of a record that includes inline TEXT data
field1textlengthfield2textdata

The length of the TEXT data is included in the fixed-length part of the record. The actual TEXT data is inserted at the end of the fixed-length part of the record. The reads the TEXT length from the fixed-length part of the record and uses that length to read the actual TEXT data. The HPL also uses the TEXT length to calculate the offset to the beginning of the next record.

The following figure shows the format definition of a record with inline BYTE and TEXT data. The arrows show how the HPL puts the record into the database. The arrows from field 1 and field 2 indicate entries in fixed-length format. The split arrow shows that the HPL uses the TEXT length information to find the TEXT data and insert it into the table. The HPL does not insert the TEXT length into the database.
Figure 2. Inline TEXT Data
begin figure description - This figure is described in the surrounding text. - end figure description
When you define the format in the Format-Definition window, select Blob Length as the data type for the textlength field. The following figure shows the format for the example in Organization of a record that includes inline TEXT data. The format does not include an entry for TEXT data.
Figure 3. Fixed format that includes TEXT data
begin figure description - This figure is described in the surrounding text. - end figure description

When you create a map to link the input fields that are defined by the format to the columns of a database table, connect the textlength input field to the table column that contains the TEXT data.