Top
NetCOBOL V11.0 CBL Subroutines User's Guide
FUJITSU Software

11.1 CBL_GET_CSR_POS

This routine returns the numeric values indicating the current line and column positions of the cursor. The top-left corner of the screen is assumed to be the origin (where the line and column numbers are 0).

Specification

Parameter data definition
01 text-cursor-position.
   02 line-position     PIC 9(4) BINARY.
   02 column-position   PIC 9(4) BINARY.
01 status-code          PIC S9(4) COMP-5.
Calling format
CALL "CBL_GET_CSR_POS"
    USING text-cursor-position
    RETURNING status-code.

Interface

line-position

Specifies the area to store the line position of the text cursor.

column-position

Specifies the area to store the column position of the text cursor.

Return code

The return code is set in the status-code specified in the RETURNING clause.

status-code
  • 0: Successful

  • Other than 0: Failure

Note

Note the following points when using CBL_GET_CSR_POS:

If the text cursor is not found on the screen, 255 is set in the line and column parameters.

If the specified cursor position exceeds the size of the screen, this routine will fail.