Using the CHANGE command in the Find/Change Utility
The CHANGE command operates on the data set or data set members selected in the Find/Change Utility.
The CHANGE command or any of its abbreviations is entered on the Command line, together with the desired parameters. To find and replace long strings that do not fit on the Command line, enter the CHANGE primary command (or one of its abbreviations, such as C) with no parameters, or enter the CX command on the Command line with no parameters. This displays the Extended Command Entry panel, in which you can enter long strings and the CHANGE command parameters.
You can limit the effects of the change command by issuing the BOUNDS command before issuing the CHANGE command, or by using one or more of the following parameters:
- col1 and col2
- Col1 is the first column to be included in the range of columns to be searched. It must be greater than or equal to 1, and less than or equal to the maximum record length. Col2 specifies the last column to be included in the range of columns to be searched.
- MAXINREC(n)
- The MAXINREC(n) parameter allows you to specify the maximum number of changes that can be made within a single record.
- MAXRECS(n)
- The MAXRECS(n) parameter allows you to specify the maximum number of records that can be changed within a single data set or PDS member.
- FIRST(n)
- The FIRST(n) parameter allows you to specify the maximum number of total changes that can be performed within a single data set or PDS member.
Suppose you want to change the string “SALESPERSON-CODE” to “SALESPERSON-NUMB” in certain members of a PDS.
- Select the members you want to search.
- Enter
CHANGE SALESPERSON-CODE SALESPERSON-NUMB
. File Manager displays a panel showing the changed records (only one in this case) as shown in Figure 1.Note: On the Find/Change Utility report, the record number can have one of these prefixes:- K
- Indicates the change involved a key.
- X
- Indicates that although it was eligible to be changed, the change could not be performed due to record length restrictions.
- KX
- Indicates both of the above.
- Press F3 (Exit)
The PDS Find/Change pop-up window appears.
- Press Enter to save or F3/End to cancel changes.
Related topics