Prototype
subroutine EcsGetVisibleScreen(integer:Top, integer:Left, integer:Bottom, integer:Right, string:Content)
Description
Copies the contents of the specified rectangular area of a 3270/5250 screen buffer into a string variable, excluding non-visible fields.
Parameters
Top |
Input |
An integer denoting the line on the screen where to start reading. The number must be greater than zero and less than or equal to the number of lines on the screen. |
Left |
Input |
An integer denoting the column on the screen where to start reading. The number must be greater than zero and less than or equal to the number of columns on the screen. |
Bottom |
Input |
An integer denoting the line on the screen where to stop reading. The number must be greater than or equal to the Top parameter and less than or equal to the number of lines on the screen. |
Right |
Input |
An integer denoting the column on the screen where to stop reading. The number must be greater than or equal to the Left parameter and less than or equal to the number of columns on the screen. |
Content |
Output |
A string variable, which will hold the content of the specified area of the screen. |
Return Value
ECS_E_NOTINIT |
Not initialized - command was ignored |
ECS_E_NOTCONN |
Not connected to an active session |
ECS_E_BADCOPY |
Unable to copy data from presentation space |
ECS_E_SCRNAREA |
Invalid screen area limits |
ECS_E_ERRORFREE |
No errors were generated |
Example
###*************************************************************
### Action to Read the Screen as seen by the User into a string
###*************************************************************
action GetVisibleScreen is
copy text of Top_SB in Read_DB to Top_IV
copy text of Left_SB in Read_DB to Left_IV
copy text of Right_SB in Read_DB to Right_IV
copy text of Bottom_SB in Read_DB to Bottom_IV
call EcsGetVisibleScreen(Top_IV, Left_IV, Bottom_IV, Right_IV, String_SV )
copy "EcsGetVisibleScreen" to Call_SV
if ( ErrorLevel_IV = ECS_E_ERRORFREE )
then
action DisplayScreen
else
action DisplayError
end if