To create a one-dimensional SDF array:
Although the fields on the screen look as though they are arranged in a two-dimensional array, the copybook entry shows a one-dimensional SDF array. See the figure below.
The BMS macro file generated is:
SDFARR DFHMSD LANG=COBOL, - MODE=INOUT, - STORAGE=AUTO, - TIOAPFX=YES, - TYPE=&&SYSPARM SDFARR DFHMDI SIZE=(24,80) * FIELD FIELD DFHMDF LENGTH=4, - POS=(5,9) * FIELD FIELD2 DFHMDF LENGTH=4, - POS=(5,14) * FIELD FIELD3 DFHMDF LENGTH=4, - POS=(5,19) * FIELD FIELD6 DFHMDF LENGTH=4, - POS=(6,9) * FIELD FIELD5 DFHMDF LENGTH=4, - POS=(6,14) * FIELD FIELD4 DFHMDF LENGTH=4, - POS=(6,19) * FIELD FIELD9 DFHMDF LENGTH=4, - POS=(7,9) * FIELD FIELD8 DFHMDF LENGTH=4, - POS=(7,14) * FIELD FIELD7 DFHMDF LENGTH=4, - POS=(7,19) DFHMSD TYPE=FINAL END
You can see that this is a horizontal array by looking at the SDF properties of the second field of the top row:
This shows the field as "Index 2 of 9". The fields are counted across the screen.
If you make the array a vertical array by checking Vertical Array and look at the SDF properties again, the field is now shown as "Index 4 of 9". The fields are now counted down the screen.