The following SEARCH statement is used to search for a string on the application screen:
SEARCH 'ENTER USERID'
In this program, the SEARCH command looks for the string "ENTER USERID" on the terminal screen. Like the COMPARE statement, the SEARCH statement sets a condition code, which the BRANCH statement uses to determine what to do next. In this program, the SEARCH statement sets the condition code EQ (for equal) if the screen contains the string. If the screen does not contain the string, the SEARCH statement sets a condition code of NE (for not equal). The BRANCH statement on the next line acts according to the condition set by the SEARCH statement.
|
Copyright © 2009 CA.
All rights reserved.
|
|