XStatus Property Example

This example uses the Screen object's OIA property to reference the OIA object. The OIA object is then used to return the status of the XCLOCK portion of the OIA (XStatus property).

Sub Main

 Dim Sys As Object

 Dim Sess As Object

 Dim MyScreen As Object

' This gets the System object

 Set Sys = CreateObject("EXTRA.System")

' Assumes an open session

 Set Sess = Sys.ActiveSession

 Set MyScreen = Sess.Screen

' The following If statement displays status messages pertaining to

' user-entered host commands and/or data.

 If MyScreen.OIA.XStatus = 1 Then

  MsgBox "You have entered an invalid number."

 ElseIf MyScreen.OIA.XStatus = 2 Then

  MsgBox "You have entered non-numeric data in a numeric field."

 ElseIf MyScreen.OIA.XStatus = 3 Then

  MsgBox "You have attempted to enter data in a protected field."

 ElseIf MyScreen.OIA.XStatus = 4 Then

  MsgBox "You have attempted to type past the end of a field."

 ElseIf MyScreen.OIA.XStatus = 5 Then

  MsgBox "The host is busy processing your request."

 ElseIf MyScreen.OIA.XStatus = 6 Then

  MsgBox "The function you requested is unavailable."

 ElseIf MyScreen.OIA.XStatus = 7 Then

  MsgBox "Unable to print to requested printer."

 ElseIf MyScreen.OIA.XStatus = 8 Then

  MsgBox "The system has locked your keyboard during processing."

 ElseIf MyScreen.OIA.XStatus = 9 Then

  MsgBox "You have entered an invalid character."

 End If

End Sub