Please enable JavaScript to view this site.

ESL Documentation

Prototype

subroutine EcsSetEmulatorWindow(integer:Command)

Description

Changes the state of the 3270 Emulator window.

Parameters

Command

Input

An integer flag that determines how the Emulator window will be changed. The options are:

ECS_EW_MAKE_VISIBLE, ECS_EW_MAKE_INVISIBLE, 

ECS_EW_ACTIVATE, ECS_EW_DEACTIVATE, ECS_EW_MINIMIZE, 

ECS_EW_MAXIMIZE, ECS_EW_RESTORE, ECS_EW_MDIAPPL. 

Note: The options can be added together, to perform more than one action at a time provided the combination makes sense.

Return Value

ECS_E_NOTINIT

Not initialized - command was ignored

ECS_E_NOTCONN

Not connected to an active session

ECS_E_NOTAVAIL

Action is not available in this configuration

ECS_E_BADCOMMAND

Bad emulate command

ECS_E_BADCOMBO

Bad emulate command combination

ECS_E_ERRORFREE

No errors were generated

Example

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

###  Action to set the emulator window

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

action SetEmulatorWindow is

    copy checked in group Visibility from SetEmulator_DB to Visibility_SV

    extract from parameter of Visibility_SV

        skip by word

        take by number Visibility_IV

    copy checked in group Focus from SetEmulator_DB to Focus_SV

    extract from parameter of Focus_SV

        skip by word

        take by number Focus_IV

    copy checked in group Size from SetEmulator_DB to Size_SV

    extract from parameter of Size_SV

        skip by word

        take by number Size_IV

    copy ( Visibility_IV + Focus_IV + Size_IV ) to Command_IV

    call EcsSetEmulatorWindow ( Command_IV )

    copy errorlevel to ErrorLevel_IV

    copy "EcsSetEmulatorWindow" to Call_SV

    if ( ErrorLevel_IV = ECS_E_ERRORFREE ) then

        copy "Set to emulator window successful" to Message_SV

        action DisplayMessage

    else

        action DisplayError

    end if

    make SetEmulator_DB invisible

    make SetEmulator_DB temporary