Using the STRING, UNSTRING, and INSPECT Statements
5.3 Examining and Replacing Characters Using the INSPECT Statement
Figure 5–2 Matching Delimiter Characters to Characters in a Field
Instruction
FIELD1 Value
ABCDEFGHI
INSPECT FIELD1...BEFORE "E".
ABCDEFGHI
INSPECT FIELD1...AFTER "E".
ABCDEFGHI
INSPECT FIELD1...BEFORE "K".
ABCDEFGHI
INSPECT FIELD1...AFTER "K".
ABCDEFGHI
INSPECT FIELD1...BEFORE "AB".
ABCDEFGHI
INSPECT FIELD1...AFTER "AB".
ABCDEFGHI
INSPECT FIELD1...BEFORE "HI".
ABCDEFGHI
INSPECT FIELD1...AFTER "HI".
ABCDEFGHI
INSPECT FIELD1...BEFORE "I".
ABCDEFGHI
INSPECT FIELD1...AFTER "I".
ZK−1426A−GE
The compiler alters the digit position containing the sign before beginning the
INSPECT operation and restores it to its former value after the operation. If
the sign’s digit position does not contain a valid ASCII signed numeric digit,
redefinition causes the value to change.
Table 5–10 shows these original, altered, and restored values.
The compiler never moves an implicitly redefined item from its storage position.
All redefinition occurs in place.
The position of an implied decimal point on numeric quantities does not affect
implicit redefinition.
Using the STRING, UNSTRING, and INSPECT Statements 5–19
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......