The cursor position on a panel is controlled either implicitly by Panel Services (for example, to identify a field in error), or by an explicit request from the procedure issuing the panel.
For explicit cursor positioning, use the #OPT statement CURSOR operand. Either specify the name of an input field defined on the panel, or supply screen coordinates as a row and column number.
#OPT CURSOR=&CURSOR
Then assign the required field name into the &CURSOR variable before displaying the panel. For example:
&CURSOR = FIELD2 -* note omission of ampersand &PANEL MYPANEL
#OPT CURSOR=&ROW,&COL
Row and column coordinates are then set from the procedure before displaying the panel. For example:
&ROW = 10 &COL = 30 &PANEL MYPANEL
Note: If the row and column coordinates that you specify lie outside the boundaries of the current operating window, the cursor is positioned on row 1, column 1 of the window.
A procedure can also influence the implicit positioning of the cursor by Panel Services. Use the &ASSIGN SETERR operand to let the procedure identify one or more fields which can be classified as being in error.
Alternatively, a procedure can use the #OPT panel statement ERRFLD operand to identify a particular field which is in error.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |