Use the QUERY_SCREEN statement to return the name of the current 3270 screen. The statement compares the current 3270 screen against all the saved captured screens and returns the name of the first screen that matches. If no match is found, the statement returns an empty string.
The QUERY_SCREEN statement is typically followed by a CASE statement that performs operations specific to each potential screen.
screen_name = QUERY_SCREEN();
To use the 3270 Script window’s Statements menu to define a QUERY_SCREEN statement, follow this procedure:
The system displays the Assignment Definition window.
The QUERY_SCREEN statement is added to the script.