Previous Topic Next topic Print topic


SDF Array

To create a one-dimensional SDF array:

  1. Create a field and name it on the Field Properties dialog box.
  2. Right-click the field and click Make Horizontal Array on the popup menu.
  3. Right-click the field and click Add Array Column on the popup menu.
  4. Right-click the field and click Add Array Row on the popup menu.
  5. Right-click the field and click Add Array Row on the popup menu.

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:

  1. Double-click the second field of the top row.
  2. Click the SDF tab.

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.

Previous Topic Next topic Print topic