Skip to content

Add the rows count of all expanded OCCURS in the GetDataLayoutRequest result (CSV mode only) #2856

Description

@efr15

While calling the GetDataLayoutRequest in CSV mode, it could be useful to know how many rows will be generated when all OCCURS of a source are expanded.

This information should consequently be added in the result.

How to count:

  • If a node is an OCCURS, it is counted as many times as its max OCCURS
  • If a node is included in one or several OCCURS, it is counted as many times as the product of the cumulative max OCCURS
  • Otherwise, it is counted as one

Examples:

01 GROUP.
   05 VAR1 PIC X.
   05 VAR2 PIC X.

Count = 1 + 1 + 1 = 3

01 GROUP.
   05 VAR1 PIC X OCCURS 10.
   05 VAR2 PIC X.

Count = 1 + 10 + 1 = 12

01 GROUP OCCURS 3.
   05 VAR1 PIC X OCCURS 5.
   05 VAR2 PIC X.

Count = 3 + 3 * 5 + 3 = 21

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions