Use this record-level keyword to specify the cursor location on an output operation to the record format you are defining. Your program sends the output operation after setting the cursor location.
The format of the keyword is:
CSRLOC(field-name-1 field-name-2)
The parameter values on the keyword specify the names of two fields whose contents are the line number (for field-name-1) and the position number (for field-name-2) of the cursor location. Field-name-1 and field-name-2 are 3-byte, zoned decimal, hidden fields. Your program uses these fields to tell the OS/400 program where to locate the cursor.
The cursor is not positioned to the desired location on an output operation that leaves the keyboard locked. The cursor does not move to the desired position until your program sends an input or an output operation that unlocks the keyboard. If your program sets the cursor location fields to values outside the range of values valid for the display device, this keyword is ignored.
For any one output operation, the CSRLOC keyword overrides any other cursor location specifications, such as DSPATR(PC) and SFLRCDNBR(CURSOR), that are in effect. This keyword is in effect until your program sends another output operation with DSPATR(PC), CSRLOC, or SFLRCDNBR(CURSOR) in effect or until the record in which this keyword is specified is overlaid (OVERLAY keyword) or erased (ERASE keyword), whichever comes first.
On an input operation, the cursor location can be determined by looking at the I/O feedback area or specifying the appropriate parameter on the RTNCSRLOC keyword. See the Application Display Programming book for more information on the I/O feedback area.
Specify the CSRLOC keyword only once per record format.
The CSRLOC keyword is not valid for the following record formats.
Option indicators are valid for this keyword. Display size condition names are not valid.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.