EXPANDDDL

Valid for

Extract, Replicat

Description

Use EXPANDDDL to format Enscribe data. Enscribe DDL definitions frequently contain occurs, or array items. For example, a definition might contain:

05 GROUP1 OCCURS 3 TIMES.
   10 FIELD1 PIC X(5) OCCURS 20 TIMES.

To reference items within arrayed structures in a WHERE, FILTER, or COLMAP clause, you must identify the occurrence. The default syntax for doing so is: field_name-occurrence. For example, to retrieve the second occurrence of FIELD1 in the third group, the syntax would be GROUP1-3.FIELD1-2

The EXPANDDDL parameter changes this array notation. For example:

EXPANDDDL also determines how field occurrences are output when or FORMATSQL are specified.

Syntax

EXPANDDDL format
[, <a id="d51046e114"></a><a id="d51046e118"></a>ZEROFILL width | ARRAYWIDTH]
[, <a id="d51046e127"></a>INCLUDEREDEFS | <a id="d51046e134"></a>OMITREDEFS]

[, RESOLVEDUPINDEX]
[, RESOLVEDUPGROUP]
[, EXPANDGROUPARRAYS]

format

Can be one of the following:

ZEROFILL width | ARRAYWIDTH

Directs Extract to reference occurrences of each field adjusting for a maximum width.

INCLUDEREDEFS | OMITREDEFS

INCLUDEREDEFS includes redefined fields.

OMITREDEFS is the default. It excludes redefined fields, which has the following consequences:

RESOLVEDUPINDEX

Appends a numerical index to the end of each duplicate field or column. For example, END-DATE.YY would become YY-2 in the output since it is the second occurrence of YY in the definition.

RESOLVEDUPGROUP

Prefixes a duplicate field name with its group name and separator.

EXPANDGROUPARRAYS

Appends indexes to fields that do not necessarily occur multiple times, but which are part of groups that occur multiple times.