REPLACEOCC keyword
Specifies which occurrence of a line you want to replace:
- Use LAST if you want i5/OS to replace the last occurrence of the FILESEARCHSTR.
- Use ALL if you want i5/OS to replace all occurrences of the FILESEARCHSTR.
- Use FIRST if you want i5/OS to replace the first occurrence of the FILESEARCHSTR.
Use FILESEARCHSTR to specify the entire line that you want to replace.
i5/OS deletes the line that matches the FILESEARCHSTR and adds the specified
VAR and ADDSTR to the file at this location.
- Note:
- REPLACEOCC has precedence over LOCATION and FILESEARCHPOS. If i5/OS
does not find the FILESEARCHSTR value used with a REPLACEOCC keyword, it adds
a new line based on the value of the LOCATION keyword but does not replace
a line.