Please enable JavaScript to view this site.

ESL Documentation

Prototype

subroutine EcsReadFieldRowCol(integer:Row, integer: Col, string:FieldContents)

Description

Field-oriented. Copies the contents of a field at a specified screen position into a string variable.  

Parameters

Row

Input

An integer specifying the row in which the field is on the screen. The value must be greater than zero and less than or equal to the number of rows on the screen.

Col

Input

An integer specifying the column in which the field is on the screen. The value must be greater than zero and less than or equal to the number of columns on the screen.

FieldContents

Output

A reference to the string that will receive the content of the specified field.

Return Value

ECS_E_NOTINIT

Not initialized - command was ignored

ECS_E_NOTCONN

Not connected to an active session

ECS_E_NOFLDS

Screen contains no fields

ECS_E_FLDNUM

Invalid field number or Row/Col values were not valid, e.g. not on the screen

ECS_E_ERRORFREE

No errors were generated

Example

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

###  action to read a field at screen position

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

action ReadFieldAtPosition is

    copy text of Row_SB in Read_DB to Row_IV

    copy text of Column_SB in Read_DB to Column_IV

    call EcsReadFieldRowCol ( Row_IV, Column_IV, String_SV )

    copy errorlevel to ErrorLevel_IV

    copy "EcsReadField" to Call_SV

    if ( ErrorLevel_IV = ECS_E_ERRORFREE ) then

        copy "Read was successful" to Message_SV

        action DisplayMessage

    else

        action DisplayError

    end if