Please enable JavaScript to view this site.

ESL Documentation

Prototype

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

Description

Copies the visible 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 Visible fields in a Screen into a textual region

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

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

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

    copy "EcsReadVisibleScreen" to Call_SV

    if ( ErrorLevel_IV = ECS_E_ERRORFREE )

    then

        copy "Read was successful" to Message_SV

        action DisplayMessage

    else

        action DisplayError

    end if