Variable length segments of FLEX reference


The Variable length segments are inserted to the following fields:

COBOL/PLI Layouts

When a variable length segment is inserted using COBOL/PLI layouts, the default length of the segment is set to the length needed to hold all fields defined in the layout. Default values are supplied for all fields not provided in the insert. Although there is normally no need to explicitly set the length, it may be set and, if so, that value overrides the default. If the length specified is not large enough to include all required fields or is greater than the DBD maximum, an error is detected during validation.

When a variable length segment is changed, one of the changed fields may be beyond the length of the existing segment. If so, the length of the segment is adjusted to include all changed fields.

DL/I Field Names

When a variable length segment is inserted using DL/I field names and the length of the field is not explicitly set, the length is set to the minimum length required to include all the fields supplied on the insert. A validation error occurs if all required fields are not supplied on the insert.

The segment is initially set to binary zeros. The default values are then used for all fields in the order that the fields are defined in the DBD. The fields specified on the SET keyword of the INSERT command are then moved in the order that they were specified. The order specified may be relevant when there are overlapping fields. If the length is explicitly set on an insert or change, the length must be large enough to include all required fields but not greater than the DBD maximum to avoid an error during validation.

When a variable length segment is changed, one of the changed fields may be beyond the length of the existing segment. If so, the length of the segment is adjusted to include all changed fields.

Concatenated Segments

If the logical child of a concatenated segment is variable length, the concatenated segment cannot be formatted using COBOL or PL/I layouts. A validation error occurs for any statement that attempts to update a concatenated segment where the logical child is variable length and layouts are used. When layouts are in use and concatenated segments with a variable length logical child are printed, the segments are printed in unformatted mode.

Layouts can be used for a variable length logical child when the logical child is not concatenated with the destination parent or if using DL/I field names rather than layouts.

WHERE Clause

If a field specified by a WHERE operand is not fully contained in the current segment, then the WHERE clause is not satisfied.

Related topics

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*