Prototype
subroutine EcsGetFieldLength(integer:FieldNumber, integer:FieldLength)
Description
Field-oriented. Copies the length of a specified field into an integer variable.
Parameters
FieldNumber |
Input |
An integer denoting the field to be checked that must be greater than zero and less than or equal to the number of fields on the screen. |
FieldLength |
Output |
A reference to the integer that will receive the length 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 |
ECS_E_ERRORFREE |
No errors were generated |
Example
###******************************
### Action to get a field length
###******************************
action GetFieldLength is
copy text of FieldNum_SB in GetFieldLength_DB to Field_IV
call EcsGetFieldLength ( Field_IV, Length_IV )
copy errorlevel to ErrorLevel_IV
copy "EcsGetFieldLength" to Call_SV
if ( ErrorLevel_IV = ECS_E_ERRORFREE ) then
copy "The field length is " Length_IV to Message_SV
action DisplayMessage
else
action DisplayError
end if
make GetFieldLength_DB invisible
make GetFieldLength_DB temporary