Previous Topic: Cursor Position ConditionNext Topic: Environment Status Condition


Dialog Execution Status Condition

Purpose

Determines whether a dialog is executing for the first time in an application thread.

Syntax

►►────── FIRST-TIME ──────────────────────────────────────────────────────────►◄

Usage

Dialog Execution Status Test Outcomes

When a dialog executes for the first time, the CA ADS runtime system sets the execution status to FIRST-TIME and the outcome of the execution status test is true. The outcome of a subsequent test depends on the control command that precedes the test, as shown in the table below.

Control command

Status test outcome

DISPLAY

False.

EXECUTE NEXT FUNCTION

Depends on the control command (TRANSFER, INVOKE, LINK, or RETURN) associated with the selected application response.

INVOKE

False for the dialog issuing the INVOKE command.

LEAVE

Not applicable. The application is no longer operative.

LINK

Unchanged for the dialog issuing the LINK command.

RETURN

Not applicable. The dialog is no longer operative in the application thread.

If the dialog issuing the RETURN command is invoked or linked to again, the dialog execution status is reset to FIRST-TIME.

TRANSFER

Not applicable. The dialog is no longer operative in the application thread.

If a dialog transfers to itself, the dialog execution status is reset to FIRST-TIME.

READ

False.

WRITE

False.

CONTINUE

False.

Example

The following example shows the use of the dialog execution status condition:

IF FIRST-TIME
THEN
    MOVE 1 TO COUNTER.
ELSE
    ADD 1 TO COUNTER.

More information:

Control Commands