Previous Topic: Script Keyword DescriptionsNext Topic: ERROR Keyword


ENDSEARCH Keyword

The ENDSEARCH keyword terminates a search initiated by a SEARCH keyword.

This keyword has the following format:

ENDSEARCH

Example:

When an MCS console is active and operating correctly, it displays a message similar to one of these:

IEE152 ENTER CANCEL D C,K
IEE612I CN=05 DEVNUM=B4C SYS=S028 CMDSYS=S028

Suppose that your script contains these statements:

ERROR=IGNORE
*
SEARCH=(IEE152I)
  KEY=(K S,DEL=N,SEG=20,MFORM=(T,J)@E)
ENDSEARCH
*
SEARCH=(IEE612I)
  KEY=(K S,DEL=N,SEG=20,MFORM=(T,J)@E)
ENDSEARCH

The statements take the following actions:

  1. The first SEARCH statement tells CA Automation Point to search for the IEE152I message.
  2. If the first SEARCH statement finds message IEE152I, the KEY statement executes, putting the console in nondelete mode, setting the segment length to 20 lines, and so on; if the SEARCH operation does not locate the IEE152I string, the ERROR statement tells CA Automation Point to continue processing.
  3. The ENDSEARCH statement terminates the first search operation.
  4. CA Automation Point executes the second SEARCH operation (for the IEE612I message) in the same way.