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 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'

UTF-16 Character

(UC'ccc')

UTF-16 Text

(UT'ccc')

Note: For more information on specifying a packed-decimal expression, see 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'

UTF-16 Character

(UC'ccc')

UTF-16 Text

(UT'ccc')

FIRST

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

LAST

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

NEXT

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

PREV

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

ALL

Changes all occurrences of fromstr.

WORD

Changes only complete words in the fromstr.

PREFIX

Changes only words that begin with the fromstr.

SUFFIX

Changes only words that end with the fromstr.

CHAR

Changes 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

The CHANGE command is only applied to excluded lines.

NX

The CHANGE command is note applied to excluded lines.

Alias: C, CHG