6.2.21.3 REPLACING Phrase (Formats 2 and 3)
This phrase fills all or portions of a data item with specified
characters, such as spaces or zeros.
-
identifier-3 or literal-1
-
Is the subject field (the item whose occurrences are replaced).
Identifier-3 can be:
- An elementary alphanumeric data item
- A numeric data item with USAGE DISPLAY
- X An external floating point item
Literal-1 must be nonnumeric, and can be any figurative constant that
does not begin with the word ALL. If literal-1 is a figurative
constant, it is considered to be a 1-character nonnumeric literal.
-
identifier-5 or literal-3
-
Is the substitution field (the item that replaces the subject field).
Identifier-5 can be:
- An elementary alphanumeric data item
- A numeric data item with USAGE DISPLAY
- X An external floating point item
Literal-3 must be nonnumeric, and can be any figurative constant that
does not begin with the word ALL.
If literal-3 is a figurative constant, it is considered to be the same
length as the subject field.
The subject field and the substitution field must be the same length.
-
CHARACTERS BY
-
When the CHARACTERS BY phrase is used, the substitution field must be
1 character in length.
When CHARACTERS BY is specified and neither the BEFORE nor AFTER
phrase is specified, the substitution field replaces each character in
the inspected item (identifier-1), beginning at the leftmost character
and continuing to the rightmost.
-
ALL
-
When ALL is specified and neither the BEFORE nor AFTER phrase is
specified, the substitution field replaces each non-overlapping
occurrence of the subject field in the inspected item (identifier-1),
beginning at the leftmost character position and continuing to the
rightmost.
-
LEADING
-
When LEADING is specified and neither the BEFORE nor AFTER phrase is
specified, the substitution field replaces each contiguous
non-overlapping occurrence of the subject field in the inspected item
(identifier-1), provided that the leftmost such occurrence is at the
point where comparison began in the first comparison cycle for which
this substitution field is eligible to participate.
-
FIRST
-
When FIRST is specified and neither the BEFORE nor AFTER phrase is
specified, the substitution field replaces the leftmost occurrence of
the subject field in the inspected item (identifier-1).
When both the TALLYING and REPLACING phrases are specified (Format 3), the
INSPECT statement is executed as if an INSPECT TALLYING statement (Format
1) were specified, immediately followed by an INSPECT REPLACING statement
(Format 2).
Subtopics:
© 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.