EDITALL (EA)


The EDITALL parameter is the same as the EDIT parameter, except that it edits all occurrences of data within the area specified by a start location and a length. The EDITALL parameter follows the same shifting rules as the EDIT parameter.

The syntax of the EDITALL parameter is:

EDITALL=(location,length,compare-data,new-data)

location

Location where the search for the data begins. Any valid actual or relative location can be used.

length

Length of the search field. The value must be at least one byte longer than the compare-data length. Any valid number may be entered as long as it does not exceed the record length. Use 0 (zero) to search the area between the current actual or relative location and the end of the record.

compare-data

Data to search for in the specified location. Any valid data type described in Data Element is allowed. Multiple compare-data element values, separated by commas, are allowed. Duplication factors are not allowed.

Important

When specifying multiple compare-data element values, File-AID uses the length of each compare-data value to change the new data. The order of the compare-data element values determines the sequence of new-data replacements.

new-data


Data that replaces the compare-data when a match is found. If the new-data length is larger than the compare-data length, the remaining contiguous data is shifted to the right. If the new-data is shorter, the contiguous data to the right is shifted left and kept contiguous to the new-data.

Example:

EDITALL=(1,50,C’ABC,GHI’,C’’)

This example eliminates all occurrences of the strings ABC and GHI because the new-data is a null entry. When this statement is executed, the results on two records are:

Before:

----+----1----+----2----+----3
ABC 999 ABC 999 GHI999 GHI
ABCABC999GHIGHI999 ABC 999

After:

----+----1----+----2----+----3
    999     999 999
999999                 999

Note that data is shifted left when no blanks separate the compare-data and the adjacent data.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*