Prototype
subroutine EcsGetFieldNumber(integer:Row, integer:Column, integer:FieldNumber)
Description
Field-oriented. Locates the 3270/5250 field number for a specified screen position.
Parameters
Row |
Input |
An integer denoting the line position on the screen of the field. Row must be greater than zero and less than or equal to the number of lines on the screen. |
Column |
Input |
An integer denoting the horizontal position on the screen of the field. Column must be greater than zero and less than or equal to the number of characters on a line. |
FieldNumber |
Output |
A reference to the integer that will receive the number 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_ROWCOL |
Position specified is not in the current screen |
ECS_E_ERRORFREE |
No errors were generated |
Example
###******************************
### Action to get a field number
###******************************
action GetFieldNumber is
copy text of Row_SB in GetFieldNumber_DB to SessionRows_IV
copy text of Column_SB in GetFieldNumber_DB to SessionColumns_IV
call EcsGetFieldNumber ( SessionRows_IV, SessionColumns_IV, FieldNum_IV )
copy errorlevel to ErrorLevel_IV
copy "EcsGetFieldNumber" to Call_SV
if ( ErrorLevel_IV = ECS_E_ERRORFREE ) then
copy "The field number is " FieldNum_IV to Message_SV
action DisplayMessage
else
action DisplayError
end if
make GetFieldNumber_DB invisible
make GetFieldNumber_DB temporary