Examples of AWAITOPEN Statements

The following example indicates that the program is being used to await dialog establishment on all subfiles of the port file FILEID.

AWAITOPEN (FILEID [SUBFILE 0])

The following example indicates that the program is being used to await dialog establishment on subfile I of the port file FILEID.

AWAITOPEN (FILEID [SUBFILE I])

The following example indicates that the program is being used to await dialog establishment on subfile 1 of port file FILEID. Control is not returned to the program until the subfile is matched. In addition, the participate option is used to indicate that the program can accept or reject any offers through the RESPOND statement.

AWAITOPEN (FILEID [SUBFILE 1], WAIT, PARTICIPATE=TRUE)

The following example indicates that the program is being used to await dialog establishment on subfile N of port file FILEID. The maximum amount of time to wait for a successful match is set to the result of the arithmetic expression (X * 60 + 3).

AWAITOPEN (FILEID [SUBFILE N], CONNECTTIMELIMIT=(X * 60 + 3))