Please enable JavaScript to view this site.

ESL Documentation

Prototype

subroutine EcsGetScreen(integer:Top, integer:Left, integer:Bottom, integer:Right, string:Content)

Description

Copies the contents of the specified rectangular area of a 3270/5250 screen buffer into a string variable.

Parameters

Top

Input

An integer denoting the line on the screen where to start reading. The number must be greater than zero and less than or equal to the number of lines on the screen.

Left

Input

An integer denoting the column on the screen where to start reading. The number must be greater than zero and less than or equal to the number of columns on the screen.

Bottom

Input

An integer denoting the line on the screen where to stop reading. The number must be greater than or equal to the Top parameter and less than or equal to the number of lines on the screen.

Right

Input

An integer denoting the column on the screen where to stop reading. The number must be greater than or equal to the Left parameter and less than or equal to the number of columns on the screen.

Content

Output

A string variable, which will hold the content of the specified area of the screen.

Return Value

ECS_E_NOTINIT

Not initialized - command was ignored

ECS_E_NOTCONN

Not connected to an active session

ECS_E_BADCOPY

Unable to copy data from presentation space

ECS_E_SCRNAREA

Invalid screen area limits

ECS_E_ERRORFREE

No errors were generated

Example

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

###  Action to Read the Screen into a string

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

action GetScreen is

    copy text of Top_SB in Read_DB to Top_IV

    copy text of Left_SB in Read_DB to Left_IV

    copy text of Right_SB in Read_DB to Right_IV

    copy text of Bottom_SB in Read_DB to Bottom_IV

    if ( Colored_CB is checked )

    then

        call EcsGetColoredScreen ( Top_IV, Left_IV, Bottom_IV, Right_IV, String_SV )

        copy "EcsGetColoredScreen" to Call_SV

    else

        call EcsGetScreen ( Top_IV, Left_IV, Bottom_IV, Right_IV, String_SV )

        copy "EcsGetScreen" to Call_SV

    end if

    if ( ErrorLevel_IV = ECS_E_ERRORFREE )

    then

        action DisplayScreen

    else

        action DisplayError

    end if