Use the EXISTS statement to check for the existence
of a specified field on the current 3270 screen. The statement returns
TRUE or FALSE.
Example
IF EXISTS ( Main_menu.Extension_field )
THEN
.
.
.
ENDIF
Procedure
To use the
3270 Script window’s Statements menu to define an EXISTS statement,
follow this procedure:
- From the Welcome window, click on Applications
—> 3270 Servers
- Selecting the EXISTS statement : Click Statements
—> Conditional.
The system displays the Conditional
Definition window.
- Selecting the conditional statement : Click the appropriate
conditional statement that is to use EXISTS as a condition:
- IF condition THEN
- ELSEIF condition THEN
- WHILE condition DO
- If the statement is to test when the EXISTS condition is not true,
click the NOT pushbutton.
- Defining the condition : Click condition.
The system displays the Condition Definition window.
- Click the pushbutton next to Condition Type,
then click Field Exists.
The Condition
Definition window changes to suit the EXISTS statement definition.
- Specifying the field : Type the name of the field next
to Field, or click Field to
display the Field Selection window to select the field.
In the
Field Selection window:
- Click the button next to System Server if
the field exists on a screen that is defined to the 3270 server named system.
Scripts and screens defined to the system server can be accessed by
all 3270 servers.
- Click the required screen and field.
- Click the Detail pushbutton to show
the description of the selected field.
- Click OK.
The Conditional Definition
window displays the EXISTS statement in the condition field.
- Adding the statement to the script : Click OK.
The EXISTS statement is added to the script.