Previous Page Contents Page Next Page

4.5 Convert Position or RowCol

The Convert Position or RowCol function performs one of the following functions depending on the request parameters passed to the function by your application program:

This function takes the screen model and the size of the corresponding presentation space into account during the conversion.

4.5.1 Prior Functions

Your application does not need to call any functions prior to this function.

4.5.2 Request Parameters

Your application program must pass the following parameters to this function:

func_number

99 HA_CONVERT_POS_ROW_COL

data_string

A 2-character string containing the following characters:

First character

The session ID for the appropriate presentation space; this is required because the conversion varies for sessions with different screen models. For more information, see Affected by Set Session Parameters?

Second character

Possible values are:

P

Converts a presentation space position to row and column coordinates.

R

Converts row and column coordinates to a presentation space position.

row_number

If you are converting a presentation space position into row and column coordinates (P specified in data_string ), this parameter should contain a null value. If you are converting row and column coordinates into a presentation space position ( R specified in data_string), this parameter contains the row number being converted.

ps_position or column

If you are converting a presentation space to row and column coordinates (P specified in data_string), this is the presentation space position being converted. If you are converting row and column coordinates into a presentation space position ( R specified in data_string), this is the column number being converted.

4.5.3 Returned Parameters

This function returns the following parameters to your application program:

func_number

99

data_string

This parameter is not used.

row_number

If you are converting presentation space to row and column coordinates, this parameter contains the row number for presentation space position. Presentation Space Sizes, shows the PS positions for each of the display models. If the function returns a zero in this parameter, the row number is not valid for the presentation space.

status_code

This function returns a status code rather than a standard return code in the fourth request parameter. The status code indicates whether the function was successful and, if so, the presentation space or column number, depending on the type of conversion being performed. The valid status codes are:

HARC99_INVALID_INP

The PS position or column specified is not valid.

HARC99_INVALID_PS

Your application program specified a session ID that is not valid for the session, or a system error occurred.

HARC99_INVALID_CONV_OPT

The 2nd character in the data string requesting parameter was not P or R.

(any other number > 0)

Presentation space position or column number, depending on the type of conversion being performed. Presentation Space Sizes, shows the PS positions for each of the display models.

4.5.4 Affected by Set Session Parameters?

This function is affected by the following option of the Set Session Parameters function:

Indicates that any session ID in the range 0x01- 0xFF can be used. Alphabetic session IDs are case sensitive. The ASCII space character is a valid session ID. To indicate the currently connected PS, use a null character (0x00).

Indicates that only alphabetic session IDs (A-Z) can be used. Session IDs are not case sensitive. To indicate the currently connected PS, use a null character (0x00) or the ASCII space character.

For more information, see Set Session Parameters.

4.5.5 Usage and Restrictions

Usage and restrictions are:

Previous Page Contents Page Top of Page Next page