Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

8.1.4.2 REPLACING Phrase



In the discussion that follows, each operand can consist of one of the following:

When the REPLACING phrase is specified, the library text is copied, and each properly matched occurrence of operand-1 within the library text is replaced by the associated operand-2.

pseudo-text
A sequence of character-strings and/or separators bounded by, but not including, pseudo-text-1 delimiters (==). Both characters of each pseudo-text-1 delimiter must appear on one line; however, character-strings within pseudo-text-1 can be continued.

Any individual character-string within pseudo-text-1 can be up to 322 characters long. Keep in mind that a character-string must be delimited by separators. For more information, see "Characters" in topic 1.1.

Pseudo-text-1 refers to pseudo-text when used for operand-1, and pseudo-text-2 refers to pseudo-text when used for operand-2.

Pseudo-text-1 cannot be null, nor can it consist solely of the space character, separator comma, separator semicolon, and/or of comment lines. Beginning and ending blanks are not included in the text comparison process. Embedded blanks are used in the text comparison process to indicate multiple text words.

Pseudo-text must not contain the word COPY.


X Pseudo-text-1 can consist solely of the separator comma or separator
X semicolon.

Pseudo-text-2 can be null; it can consist solely of space characters and/or comment lines. Each text word in pseudo-text-2 that is to be copied into the program is placed in the same area of the resultant program as the area in which it appears in pseudo-text-2.


X Pseudo-text can contain DBCS or EUC user-defined words, but the
X characters cannot be continued across lines.

identifier
Can be defined in any Data Division section.

literal
Can be numeric or nonnumeric.


X Can be a DBCS literal.

word
Can be any single COBOL word (except COPY).


X You can include the non-separator COBOL characters (for example, +, *,
X /, $, <, >, and =) as part of a COBOL word when used as REPLACING
X operands. In addition, the hyphen character can be at the beginning
X or end of the word.

For purposes of matching, each identifier-1, literal-1, or word-1 is treated, respectively, as pseudo-text containing only identifier-1, literal-1, or word-1.


X Either operand, or both, can be a DBCS or EUC name or DBCS literal.

Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.