Getting Started


Defining a map array

You can define arrays of variable fields in a map to make it easier to work with several related fields at the same time.

To define an array, you first specify the array's physical arrangement on the map and give the array a name.

You need to define four arrays for your sample program. These four map arrays are arranged in four columns named CUSNUM-A, CUSNAME-A, CUSCONTACT-A, and CUSPHONE-A.

Turn on the grid, select View>Grid, to help you locate lines and columns referenced in the following tasks. If you want to look at array indices, select Define>Field Edit Order>Show Tags. Both of these features can be turned off by repeating the menu selections you used to turn them on.

To define the first map array:

  1. In the Map Editor, from the Palette, select the Array part
    Figure arraymap not displayed.
    .
  2. Click in row 6, column 1 (6,1) of the map presentation area.
  3. On the Array tab, in the Fields down field, type 5.

    Figure 60. Array Tab on the Variable Field Properties Window

    Figure winarvfp not displayed.

  4. Select the General tab.

Figure 61. General Tab on the Variable Field Properties Window

Figure winagvfp not displayed.

On the General tab, you specify the name of the array variable for the map array. You can also specify an array index. Each variable field in the map array is assigned a subscripted name, starting with this index. For instance, if you specify SSN as the name and 1 as the starting index, the variable names assigned are SSN(1), SSN(2), SSN(3), and so on.

If the map array you are defining has multiple rows and columns, you can use the Naming Direction selections on the Array tab to choose the direction used first in assigning names to the variable fields. Because you are defining an array with only one column in this exercise (1 is the default value in the Fields across field), the naming direction is not important.

  1. In the Name field, type cusnum-a.
  2. In the Length field, type 8.
  3. Select OK.

Now define three more arrays using these same steps and the names and values in the following table.

Start column Fields down Array name Length
13 5 cusname-a 20
37 5 cuscontact-a 20
61 5 cusphone-a 12

Your map should look like the one shown in Figure 62.

Figure 62. Map Editor

Figure custmap5 not displayed.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]