Configuring a rotated array

  1. Select a table in the upper pane of the CONNX Data Dictionary Manager window.

    image\rotated_01.jpg

  2. Select the Rotated Array check box under Large Rotated Array Information.

    image\rotated_02.jpg

  3. Specify the actual size of the array. For fixed array sizes, type in the number of elements in the array. If the array size changes depending on another field in the record (a dynamic array), specify that field, or any valid SQL Expression that will determine the size of the array. You may use the following expression to determine the size of the array:

    header length + (array element counter (array_CTR) x array element length)


    For variable length arrays, the counter field (possibly ending in _CTR, depending on how it was initially set up in RMS and VSAM) appears in the CDD, listing the number of occurrences of the array.

  4. The Maximum Size, which equals the total number of elements in the array, is entered automatically, but it can be adjusted. In fixed-length arrays, this number is the same as the actual size.

  5. If a Null record is to be returned even when the array size is zero for a particular row, select the Return NULL when Size = 0 check box.

  6. If the record layout contains more than one variable length array, specify a Dynamic array offset, which is the starting position in the record for this array. This is usually a SQL calculation that adds the length of the fixed portion of the record layout to the size of the preceding variable length arrays. The sizes of the preceding arrays are calculated by multiplying the size of one instance of the array by the number of occurrences of the array.
     

Example 1 (An array with one element):

CustomerName

Phone

CNXARRAYCOLUMN

Nick Delmonico

(555) 333-4444

0

Nick Delmonico

(555) 333-5555

1

Nick Delmonico

(555) 333-6666

2

 

Length Array
10  Phone_0001
10  Phone_0002
10  Phone_0003

1 element = 10 bytes
 

Example 2 (An array with two elements):

CustomerName

Address

CNXARRAYCOLUMN

City

Nick Delmonico

Suite 1A

0

North Bend

Nick Delmonico

555 West Elm

1

North Bend

Nick Delmonico

Apt C

0

Lincoln

Nick Delmonico

14 H Street

1

Lincoln

 

Length Array
20  Address_Line1_0001
20  Address_Line2_0001
10  City_0001
20  Address_Line1_0002
20  Address_Line2_0002
10  City_0002

 

1 element = 50 bytes

  1. Click the Table Columns tab.

    image\rotated_03.jpg

  2. Specify the offset, length, and data type of the first element of the array in the Offset, Length, and DataType columns.

  3. Specify the size of one complete element of the array in the Array field. Size is determined by record layout.

    Example:


    Column name  Length
    Address_CTR  2
    Address_0001  10
    Address_0002  10
    Address_0003  10

    The value of the array equals 10.