Please enable JavaScript to view this site.

ESL Documentation

Prototype

subroutine EcsGetFieldAttribute(integer:FieldNumber, integer:FieldAttribute, integer: AttributeState)

Description

Field-oriented. Copies the state of the specified field attribute of the 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.

FieldAttribute

Input

An integer that specifies the attribute to be checked.

AttributeState

Output

A reference to the integer that will receive the specified attribute state of the specified field. The value of this parameter will be zero if the attribute is false, or one, if it is true.

Field Attributes

ECS_PROTECTED

is field protected?

ECS_INTENSIFIED

is field intensified?

ECS_NONDISPLAY

is field non-display?

ECS_MODIFIED

has field been modified?

Field States

ECS_NOT_PROTECTED

field is not protected

ECS_IS_PROTECTED

field is protected

ECS_NOT_INTENSIFIED

field is not intensified

ECS_IS_INTENSIFIED

field is intensified

ECS_NOT_NONDISPLAY

field is not non-display

ECS_IS_NONDISPLAY

field is non-display

ECS_NOT_MODIFIED

field has not been modified

ECS_IS_MODIFIED

field has been modified

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_FLDATTR

Invalid field attribute specified

ECS_E_ERRORFREE

No errors were generated

Example

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

###  Action to get a field attribute for 3270 Session

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

action GetFieldAttribute is

    copy text of FieldNum_SB in GetFieldAttribute_DB to Field_IV

    copy ECS_MODIFIED to FieldAtt_IV

    call EcsGetFieldAttribute ( Field_IV, FieldAtt_IV, State_IV )

    copy errorlevel to ErrorLevel_IV

    copy "EcsGetFieldAttribute" to Call_SV

    if ( ErrorLevel_IV = ECS_E_ERRORFREE ) then

        if (State_IV = ECS_IS_MODIFIED) then

           copy "Field has been modified" to Message_SV

        else

           copy "Field has not been modified" to Message_SV

        end if

        action DisplayMessage

    else

        action DisplayError

    end if

    make GetFieldAttribute_DB invisible

    make GetFieldAttribute_DB temporary