Consider what happens when a group array column (GRP2) is selected and passed as is. Four fillers are created: one for column A, one for columns C1 and C2, one for columns D1 through D3, and one for columns E and G. Since GRP2 is nested within GRP1, and GRP1 redefines column B, both column B and GRP1 are preserved.
| Column | Picture Clause | Starting column | Ending column | Storage length |
|---|---|---|---|---|
| FILLER_1_1 | PIC X(1). | 1 | 1 | 1 |
| B | PIC X(8). | 2 | 9 | 8 |
| GRP1 | REDEFINES B. | 2 | 9 | 8 |
FILLER_2_3 |
PIC X(2). | 2 | 3 | 2 |
GRP2 |
OCCURS 2 TIMES. | 4 | 9 | 6 |
FILLER_1 |
PIC X(3). | |||
| FILLER_10_11 | PIC X(2). | 10 | 11 | 2 |
If the selected array column (GRP2) is flattened, both occurrences (GRP2 and GRP2_2) are loaded into the stage. The file layout is:
| Column | Picture Clause | Starting column | Ending column | Storage length |
|---|---|---|---|---|
| FILLER_1_1 | PIC X(1). | 1 | 1 | 1 |
| B | PIC X(8). | 2 | 9 | 8 |
| GRP1 | REDEFINES B. | 2 | 9 | 8 |
FILLER_2_3 |
PIC X(2). | 2 | 3 | 2 |
GRP2 |
4 | 6 | 3 | |
FILLER_1 |
PIC X(3). | 4 | 6 | 3 |
GRP2_2 |
7 | 9 | 3 | |
FILLER_1_2 |
PIC X(3). | 7 | 9 | 3 |
| FILLER_10_11 | PIC X(2). | 10 | 11 | 2 |
This topic is also in the IBM InfoSphere DataStage Mainframe Job Developer's Guide.
