Cursor positioning specifications

Do not specify cursor positioning values to fixed locations on the screen, because different languages have different space requirements.

When you work with different display files, you can adjust them with the translation process. When you need to work with field-independent cursor locations, store the positional information outside of your code and retrieve the variable values for the keyword within your program.

For example:

A     record-name      CSRLOC(field-name-1 field-name-2)

Cursor positioning on the field level is more useful in an NLS environment. For normal records, this is done by specifying the DSPATR(PC) keyword on a specific field. For subfiles, the cursor can be positioned using SFLRCDNBR(CURSOR) keyword on a special positioning field. In addition, the subfile record number must be stored in that field before the format is written.

For example:

A     field-name      4S 0B  line pos  SFLRCDNBR(CURSOR)
Note: The name of the record and field where the cursor is positioned, the subfile relative record number, and subfile fold/truncate indicator can be returned to your application program. This function is provided by hidden fields on the DDS keywords RTNCSRLOC, SFLCSRRRN, and SFLMODE.
Related concepts
RTNCSRLOC keyword
SFLCSRRRN keyword
SFLMODE keyword