Wait (4)

Top  Previous  Next

The Wait function checks the status of the host-connected presentation space. If the session is waiting for a host response (indicated by XCLOCK (X []) or XSYSTEM), the Wait function causes EHLLAPI to wait up to 1 minute to see if the condition clears.

 

3270

5250

Yes

Yes

 

 

Prerequisite Calls

 

Connect Presentation Space (1)

 

 

Call Parameters

 

 

Standard Interface

Enhanced Interface

Function Number

Must be 4

 

Data String

NA

 

Length

NA

 

PS Position

NA

 

 

 

Return Parameters

 

Return Code

Definition

0

The keyboard is unlocked and ready for input.

1

Your application program is not connected to a valid session.

4

Timeout while still in XCLOCK (X []) or XSYSTEM.

5

The keyboard is locked.

9

A system error was encountered.

 

 

Remarks

 

1.The Wait function is used to give host requests like those made by the Send Key (3) function the time required to be completed.
2.Using the Set Session Parameters (9) function, you can request the TWAIT, LWAIT, or the NWAIT option. You can use this function to see if the host OIA is inhibited.
3.The Wait function is satisfied by the host unlocking the keyboard. Therefore, a return code of 0 does not necessarily mean that the transaction has been completed. To verify completion of the transaction, you should use the Search Field (30) function or Search Presentation Space (6) function combined with the Wait function to look for expected keyword prompts.