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.
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:
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:
ABC 999 ABC 999 GHI999 GHI
ABCABC999GHIGHI999 ABC 999
After:
999 999 999
999999 999
Note that data is shifted left when no blanks separate the compare-data and the adjacent data.