ROWCOL
|
Where
row is an integer expression. If an integer constant expression, row must be from 1 to 255.
column is an integer expression. If an integer constant expression, column must be from 1 to 255.
Results
Integer
Function
The ROWCOL function is valid only when coded as the offset on a SUBSTR or ATTR3270 function. It returns the screen index of the position referenced by row and column.
When coding ROWCOL as the offset on a SUBSTR function, the source of the substring must be either BUFFER or SCREEN.
Examples
a = substr(screen,rowcol(1,1),5) /* Assigns to string variable */
/* "a" the 5-character string */
/* found at row 1, column 1 */
/* on the screen. */
x = 20
y = 40
a = substr(screen,rowcol(x,y+5),10)
/* Assigns to string variable */
/* "a" the 10-character string */
/* found at row 20, column 45 */
/* on the screen. */
if substr(screen,rowcol(x,y+5),5) = 'Hello' then
/* Tests the screen location */
/* row 20, column 45 for a */
/* value of Hello. */