Previous Topic: CAPSNext Topic: Change Command "From" and "To" Character Strings of Different Lengths


CHANGE

Changes one string to another. For more details on changing to or from strings of different length, see the topic "Change Command "From" and "To" Character Strings of Different Lengths."

Note: If you are editing a PDS member, you can use the PDSCHG command to set the mode for the CHANGE command.

Syntax:

   CHANGE
      fromstr     tostr
      [FIRST|LAST|NEXT|PREV|ALL]
      [WORD|PREFIX|SUFFIX|CHAR]
      [label1 label2]
      [lcol  rcol]
      [X|NX]

Syntax Description:

fromstr

Specifies the from string. Enter a string in one of the following formats:

Character

(C'ccc')

Text

(T'ccc')

Hex

X'xx'

Packed-decimal expression

PLn'vvv' or P'y'

Note: For more information on specifying a packed-decimal expression, see the "Rules for Finding Packed Strings on the FIND Command."

tostr

Specifies the to string. Enter a string in one of the following formats:

Character

(C'ccc')

Text

(T'ccc')

Hex

X'xx'

Packed-decimal expression

PLn'vvv' or P'y'

FIRST

Starts search at the beginning of the data set, and locates the first occurrence of fromstr.

LAST

Starts search at the end of the data set, and locates the last occurrence of fromstr.

NEXT

Starts from the current cursor position, and locates the next occurrence of fromstr.

PREV

Starts from the current cursor position, and locates the previous occurrence of fromstr.

ALL

Locates all occurrences of fromstr.

WORD

Locates only complete words in the fromstr.

PREFIX

Locates only words that begin with the fromstr.

SUFFIX

Locates only words that end with the fromstr.

CHAR

Locates the fromstr in any part of a word.

label1

Specifies the start point in a range of lines to which the CHANGE command is applied.

label2

Specifies the end point in a range of lines to which the CHANGE command is applied.

lcol

Specifies the leftmost column in which fromstr can appear. If rcol is not also specified, fromstr must begin in lcol.

rcol

Specifies the rightmost column in which fromstr can appear.

X

Only excluded lines should be searched.

NX

Excluded lines should not be searched.

Alias: C, CHG