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

6.2.21.8 Example of the INSPECT Statement



Figure 10 is an example of INSPECT statement results.



INSPECT ID_1 TALLYING ID_2 FOR ALL "**" REPLACING ALL "**" BY ZEROS.

___ ___ ___ ___ ___ ___ ___ ID_1 before | * | * | * | 0 | * | * | ID_2 before | 0 | execution |___|___|___|___|___|___| execution |___| | | | | (initialized by | | | | programmer) Execution for | | | | TALLYING ID_2 TALLYING phrase: | | | | comparand: contains: 1st ___ ___| | | | ___ ___ ___ comparison | * | * | | | | = | * | * | (true) | 1 | |___|___| | | | |___|___| |___| | | | | 2nd |___|___| | ___ ___ ___ comparison | * | 0 | | = | * | * | (false) | 1 | |___|___| | |___|___| |___| | | | | | 3rd | |___|___ | |___ ___ ___ comparison | | 0 | * | | = | * | * | (false) | 1 | | |___|___| | |___|___| |___| | | | 4th | |___ ___| ___ ___ ___ comparison | | * | * | = | * | * | (true) | 2 | | |___|___| |___|___| |___| Execution for | REPLACING phrase: | 5th ___ ___| ___ ___ ID_1 changed comparison | * | * | = | * | * | (true) to_ |___|___| |___|___| | ___ ___ ___ ___ ___ ___ | | 0 | 0 | * | 0 | * | * |<_________________________________| |___|___|___|___|___|___| | | | |___|___ | ___ ___ ID_1 6th | * | 0 | | = | * | * | (false) unchanged comparison |___|___| | |___|___| | | | |___|___ | ___ ___ ID_1 7th | 0 | * | | = | * | * | (false) unchanged comparison |___|___| | |___|___| | | |___ ___| ___ ___ ID_1 changed 8th | * | * | = | * | * | (true) to______ comparison |___|___| |___|___| | ___ ___ ___ ___ ___ ___ | | 0 | 0 | * | 0 | 0 | 0 |<_________________________________| |___|___|___|___|___|___| |___|___|___|___|___|___|

At the end of inspection: ID_1 ___ ___ ___ ___ ___ ___ ID_2 ___ contains: | 0 | 0 | * | 0 | 0 | 0 | contains: | 2 | |___|___|___|___|___|___| |___|


Figure 10. Example of INSPECT Statement Execution Results



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.