Adding and deleting data records

You can add and delete data records in the Test Case Editor. The results of the Add Record and Delete Record actions vary according to the context in which you request them. You can request an Add Record action in the context of a test entry, a record, or a call unit. You can request a Delete Record action in the context of a test entry or a record.

About this task

Note: You cannot use the Add Record action or the Delete Record action when the data records are captured.
The term data record refers to one of these sets of data:
  • For dependent files, it refers to the records in the files.
  • For subroutines, it refers to the set of data referred to in each subroutine call. In the following COBOL sample, for example, you can define three data records as test data for PARM1.
    PERFORM 3 TIMES
       CALL SUB1 USING PARM1
    END-PERFORM
    The following sample illustrates a similar construction in PL/I:
    do count = 1 to 3;
     call sub1(parm1);
     count += 1;
    end;
    
    The test target procedure can have only one data record.
Record count check
If the number of record count during a test case run is less than the expected number, the test results fail.
The expected number of records is the larger number among the number of records recorded when recording test case data and the maximum record index that is entered for the expected value data.
The check of record count number is skipped for any record that is specified to Skip Evaluation. If a record is not specified to skip the evaluation, even if a parameter data item in it is specified to skip evaluation, the record count check is still done.