Navigating arrays and redefine data items

The Test Case Editor collapses arrays and redefine data items so that they are easier to navigate. The editor provides tools for expanding and navigating collapsed arrays and redefined data items.

About this task

The following sample code block defines two redefine items and two arrays:
       01 LOGICALPARAMS.
           03 I-ITEM01     PIC X(20).
           03 R-ITEM01     REDEFINES I-ITEM01 PIC 9(20) .
           03 I-ITEM02     PIC X(20).
           03 R-ITEM02     REDEFINES I-ITEM02 OCCURS 20  PIC X(1) .
           03 I-ITEM03     OCCURS 25 PIC X(2).
A data item and its redefine items are treated as a group: only one data item is used for the test program, and other data items are ignored. In the Test Case Editor, the redefine item in the sample code block is displayed as shown in this example:
Redefine data item in the Test Case Editor
Restriction: A test case can have only one redefine structure selected across all test entries in the test case. If you want to test with a different redefine item, you must create a new test case.
An array consists of one base item name and its array indices. Arrays can be large, so Test Case Editor shows only one element in an array and shows placeholders for the other elements. In Test Case Editor, the arrays that are defined in the sample code block are displayed as shown in this example:
Example of arrays displayed in the Test Case Editor

Procedure

  • To display the next array item, double-click the placeholder.
    The next array item is displayed and the placeholders are updated.
    Example of next ten arrays displayed in the Test Case Editor
  • To locate an array item:
    1. Select the array to search, and then right-click and select Locate Array Item.
    2. In the Locate Array Item window, type the index of the array item to locate and then click OK.
      Locate Array Item window
      The editor highlights the array and positions the placeholder at the located array item.
    Note: When you select Locate Array Item from the parent of a nested array, it does not locate items in the nested array. To locate an item in a nested array, selected the nested array and then select Locate Array Item.
  • To increase or decrease the number of array items that are shown in the editor:
    1. Select a placeholder, and then right-click and select Show More or Show Less.
      Show More window
      Show Less window
    2. Type the number of array items to add to or remove from the displayed items, and then click OK.
      The array items and the placeholder are updated in the editor. In this example, 5 array items are added to the displayed items.
      Array showing 5 items
      Note: Show More and Show Less are shown only on placeholders of the lowest level arrays in nested arrays.
  • To copy and paste an entire column of Input or Expected output data:
    1. Select the data cell in the top row of the column you want to copy.
    2. Scroll the editor to the bottom row.
    3. Press the Shift key and select the data cell in the bottom row.
    4. Right-click and select Copy.
    5. Select the target column, right-click, and select Paste.