Prototype
subroutine EcsGetSessionStatus( integer:SessionStatusIndicator )
Description
Reports the status of a 3270/5250 session to which you are connected.
Parameters
SessionStatusIndicator |
Output |
An integer that receive a code of the session indicator state. |
Session Indicator States
ECS_SS_DISCONNECTED |
The session is disconnected |
ECS_SS_UNOWNED |
The display is unowned |
ECS_SS_CONTROL |
The display is owned by a control program |
ECS_SS_APPLICATION |
The display is owned by an application |
Return Value
ECS_E_NOTINIT |
Not initialized - command was ignored |
ECS_E_NOTCONN |
Not connected to an active session |
ECS_E_NOT3270SESSION |
Not connected to a 3270 session |
ECS_E_ERRORFREE |
No errors were generated |
Example
###**********************************
### Action to get the session status
###**********************************
action GetSessionStatus is
call EcsGetSessionStatus ( IndicatorState_IV )
copy errorlevel to ErrorLevel_IV
copy "EcsGetSessionStatus" to Call_SV
if ( ErrorLevel_IV = ECS_E_ERRORFREE ) then
copy "The Session Status is " IndicatorState_IV to Message_SV
action DisplayMessage
else
action DisplayError
end if