Previous Topic: Prevent an Endless LoopNext Topic: Receive Data from the User


Wait for Specific Data from Application

The SRCHWAIT command combines the features of the SEARCH and WINP commands. You can use the SRCHWAIT command in environments such as VM and CA‑Remote, where unsolicited output arrives from the application. For example, to determine whether a VM session is displaying the "Ready" prompt, use the following statement:

SRCHWAIT 'Ready'

If the data is found or if the application is sending no more data, SRCHWAIT sets a condition code (EQ or NE) and the next statement in the program is executed.

Note: ACL/E determines whether the application will be sending more data by examining the session's SNA Bracket and Change Direction state. If the application session is "IN-BRACKET" and the application has given the "change direction indicator," ACL/E concludes that the application will send no more data.