Previous Topic: CAPS CommandNext Topic: CURSOR Command


CHANGE Command

       ┌        ┐ ┌          ┐ ┌                       ┐          ┌      ┐
CHANGE │< ALL  >│ │< string >│ │<  replacement-string >│ [lb[rb]] │< X  >│
       └\ FIRST/┘ └\ *      /┘ └\  *                  /┘          └\ NX /┘

Use the CHANGE command to search for and change the next occurrence of a string in the JCL.

The EDITOR begins searching at the position of the cursor when you enter the command, and it searches downward until the string is found. If the cursor is on the COMMAND line when you enter the command, the editor begins searching at the top line displayed.

If the string is not found, it is changed to the replacement string.

string

Specifies the string of characters to find and replace by replacement-string.

replacement-string

Specifies the string of characters used to replace string.

* (asterisk)

Specifies the string value from the last FIND or CHANGE command entered.

ALL

Specifies that all occurrences of a string are to be replaced in scanned lines.

lb rb

Specifies left and right bounds (column positions) for the find. If specifying just the left bound, the string can be found anywhere within those bounds.

X

Specifies only excluded lines are to be scanned.

NX

Specifies only non-excluded lines are to be scanned.

Change Command Rules

If a string has embedded blanks, enclose the string in single or double quotes. For example:

 CHANGE 'program nmae' 'program name'
 CHANGE 'program nmae' 'program name'