Please enable JavaScript to view this site.

ESL Documentation

Prototype

subroutine EcsReadScreen(integer:Top, integer:Left, integer:Bottom, integer:Right, string:TextRegion)

Description

Copies the contents of the specified rectangular area of a 3270/5250 screen buffer into a textual region.

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.

TextRegion

Input

A string contain the name of a textual region that will receive the content from the screen buffer. This routine merely adds to the buffer, so you must clear the textual region if you need to ensure only the current screen content will be present.

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 textual region

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

action ReadScreen 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

    copy "Emulator_TR" to String_SV

    clear Emulator_TR

    if ( Colored_CB is checked )

    then

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

        copy "EcsReadColoredScreen" to Call_SV

    else

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

        copy "EcsReadScreen" to Call_SV

    end if

    if ( ErrorLevel_IV = ECS_E_ERRORFREE )

    then

        copy "Read was successful" to Message_SV

        action DisplayMessage

    else

        action DisplayError

    end if