Prototype
subroutine EcsGetFieldPosition(integer:FieldNumber, integer:Row, integer:Column)
Description
Field-oriented. Copies the starting row and column of a specified field into integer variables.
Parameters
FieldNumber |
Input |
An integer denoting the field. The number must be greater than zero and less than or equal to the number of fields on the screen. |
Row |
Output |
A reference to an integer that will receive the line position on the screen of the start of the specified field. The first line on the screen is row 1. |
Column |
Output |
A reference to an integer that will receive the horizontal position on the screen of the start of the specified field. The first character on a line is column 1. |
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 |
ECS_E_ERRORFREE |
No errors were generated |
Example
###*********************************
### Action to get a field position
###*********************************
action GetFieldPosition is
copy text of FieldNum_SB in GetFieldPosition_DB to Indicator_IV
call EcsGetFieldPosition ( Indicator_IV, SessionRows_IV, SessionColumns_IV )
copy errorlevel to ErrorLevel_IV
copy "EcsGetFieldPosition" to Call_SV
if ( ErrorLevel_IV = ECS_E_ERRORFREE ) then
copy "Row: " SessionRows_IV ", Column: " SessionColumns_IV to Message_SV
action DisplayMessage
else
action DisplayError
end if
make GetFieldPosition_DB invisible
make GetFieldPosition_DB temporary