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 INSPECT Statement



The INSPECT statement specifies that characters, or groups of characters, in a data item are to be counted (tallied) or replaced or both.


    ___ Format 1 _____________________________________________________________________________________ 
   |                                                                                                  |
   | >>__INSPECT__identifier-1__TALLYING____________________________________________________________> |
   |                                                                                                  |
   |    <____________________________________________________________________________________         |
   |                         <_____________________________________________________________  |        |
   |                                         <__________________                           | |        |
   | >____identifier-2__FOR____ _CHARACTERS____ ______________ _|________________________ _|_|_____>< |
   |                           |               |_| phrase 1 |_|                          |            |
   |                           |              <________________________________________  |            |
   |                           |                                  <__________________  | |            |
   |                           |_ _ALL_____ ____ _identifier-3_ ____ ______________ _|_|_|            |
   |                             |_LEADING_|    |_literal-1____|    |_| phrase 1 |_|                  |
   |                                                                                                  |
   | phrase 1:                                                                                        |
   | |__ _BEFORE_ __ _________ __ _identifier-4_ ___________________________________________________| |
   |    |_AFTER__|  |_INITIAL_|  |_literal-2____|                                                     |
   |                                                                                                  |
   |__________________________________________________________________________________________________|

    ___ Format 2 _____________________________________________________________________________________ 
   |                                                                                                  |
   | >>__INSPECT__identifier-1__REPLACING___________________________________________________________> |
   |                                                                                                  |
   |    <___________________________________________________________________________________          |
   |                                         <__________________                            |         |
   | >____ _CHARACTERS BY__ _identifier-5_ ____ ______________ _|_________________________ _|______>< |
   |      |                |_literal-3____|    |_| phrase 1 |_|                           |           |
   |      |              <______________________________________________________________  |           |
   |      |                                                        <__________________  | |           |
   |      |_ _ALL_____ ____ _identifier-3_ __BY__ _identifier-5_ ____ ______________ _|_|_|           |
   |        |_LEADING_|    |_literal-1____|      |_literal-3____|    |_| phrase 1 |_|                 |
   |        |_FIRST___|                                                                               |
   |                                                                                                  |
   | phrase 1:                                                                                        |
   | |__ _BEFORE_ __ _________ __ _identifier-4_ ___________________________________________________| |
   |    |_AFTER__|  |_INITIAL_|  |_literal-2____|                                                     |
   |                                                                                                  |
   |__________________________________________________________________________________________________|

    ___ Format 3 _____________________________________________________________________________________ 
   |                                                                                                  |
   | >>__INSPECT__identifier-1__TALLYING____________________________________________________________> |
   |                                                                                                  |
   |    <____________________________________________________________________________________         |
   |                         <_____________________________________________________________  |        |
   |                                         <__________________                           | |        |
   | >____identifier-2__FOR____ _CHARACTERS____ ______________ _|________________________ _|_|______> |
   |                           |               |_| phrase 1 |_|                          |            |
   |                           |              <________________________________________  |            |
   |                           |                                  <__________________  | |            |
   |                           |_ _ALL_____ ____ _identifier-3_ ____ ______________ _|_|_|            |
   |                             |_LEADING_|    |_literal-1____|    |_| phrase 1 |_|                  |
   |                                                                                                  |
   | >__REPLACING___________________________________________________________________________________> |
   |                                                                                                  |
   |    <___________________________________________________________________________________          |
   |                                         <__________________                            |         |
   | >____ _CHARACTERS BY__ _identifier-5_ ____ ______________ _|_________________________ _|______>< |
   |      |                |_literal-3____|    |_| phrase 1 |_|                           |           |
   |      |              <______________________________________________________________  |           |
   |      |                                                        <__________________  | |           |
   |      |_ _ALL_____ ____ _identifier-3_ __BY__ _identifier-5_ ____ ______________ _|_|_|           |
   |        |_LEADING_|    |_literal-1____|      |_literal-3____|    |_| phrase 1 |_|                 |
   |        |_FIRST___|                                                                               |
   |                                                                                                  |
   | phrase 1:                                                                                        |
   | |__ _BEFORE_ __ _________ __ _identifier-4_ ___________________________________________________| |
   |    |_AFTER__|  |_INITIAL_|  |_literal-2____|                                                     |
   |                                                                                                  |
   |__________________________________________________________________________________________________|

    ___ Format 4 ___________________________________________________________ 
   |                                                                        |
   | >>__INSPECT__identifier-1__CONVERTING__ _identifier-6_ __TO__________> |
   |                                        |_literal-4____|                |
   |                                                                        |
   | >__ _identifier-7_ __________________________________________________> |
   |    |_literal-5____|                                                    |
   |                                                                        |
   |    <___________________________________________                        |
   | >____ _BEFORE_ __ _________ __ _identifier-4_ _|____________________>< |
   |      |_AFTER__|  |_INITIAL_|  |_literal-2____|                         |
   |                                                                        |
   |________________________________________________________________________|

X None of the identifiers in an INSPECT statement can be windowed date
X fields.

identifier-1
Is the inspected item and can be any of the following:

  • An alphanumeric data item
  • A numeric data item with USAGE DISPLAY
  • X An external floating point item
    
    

Subtopics:



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.