Please enable JavaScript to view this site.

ESL Documentation

Prototype

subroutine EcsGetSessionInfo( string:SessionShortName, integer:Type, integer:Rows, integer:Columns )

Description

Reports the session type and screen dimensions of a specified session.

Parameters

SessionShortName

Input

The single character session name.

Type

Output

An integer that receive a code of the session type.

Rows

Output

An integer that receives the number of rows in the sessions screen buffer.

Columns

Output

An integer that receives the number of columns in the sessions screen buffer.

Session Types

ECS_ST_3270_HOST

Session is a 3270 host session.

ECS_ST_3270_PRINTER

Session is a 3270 printer session.

ECS_ST_5250_HOST

Session is a 5250 host session.

ECS_ST_5250_PRINTER

Session is a 5250 printer session.

ECS_ST_PC

Session is a PC session.

ECS_ST_VAX_HOST

Session is a VAX host session.

ECS_ST_UNKNOWN

Session is unknown.

Return Value

ECS_E_NOTINIT

Not initialized - command was ignored

ECS_E_SESSNAME

Invalid session name

ECS_E_ERRORFREE

No errors were generated

Example

###***********************************

###  Action to get session information

###***********************************

action GetSessionInfo is

    call EcsGetSessionInfo ( ShortSessionName_SV, SessionType_IV, SessionRows_IV, SessionColumns_IV )

    copy errorlevel to ErrorLevel_IV

    copy "EcsGetSessionInfo" to Call_SV

    if ( ErrorLevel_IV = ECS_E_ERRORFREE ) then

        copy "Session Info is Type: " SessionType_IV ", Rows: " SessionRows_IV ", Columns: " SessionColumns_IV to Message_SV

        action DisplayMessage

    else

        action DisplayError

    end if