convertPosition

Top  Previous  Next

 

The convertPosition function converts the host presentation space positional value into the display row and column coordinates or converts the display row and column coordinates into the host presentation space positional value. This function does not change the cursor position.

 

3270

5250

Yes

Yes

 

Prerequisite Calls

 

There are not prerequisite calls for this function.

 

 

Call Parameters

 

Parameter name

Explanation

row

When the intended conversion is display row and column coordinates to host presentation space positional value, this parameter represents the display row coordinate. Otherwise, it represents the host presentation space positional value.

col

When the intended conversion is display row and column coordinates to host presentation space positional value, this parameter represents the display column coordinate. Otherwise, it must be null, 0 or 'undefined'.

 

Return Properties

 

Property name

Explanation

rc

A numeric code indicating the execution status of the function. Please refer to the Return Code table below for all possible values.

pos

The resulting host presentation space positional value, when converting from row and column display coordinates, in the range 1-3564. The upper limit can be smaller than 3564 depending on how the host presentation space is configured.

row

The resulting display row coordinate, when converting from host presentation space positional value. Values range from 1 to 43, but the upper limit can be smaller depending on how the host presentation space is configured.

col

The resulting display column coordinate, when converting from host presentation space positional value. Values range from 1 to 132, but the upper limit can be smaller depending on how the host presentation space is configured.

 

 

Return Code

 

The following values are defined for the 'rc' property:

 

Return Code

Explanation

0

The convertPosition function was successful.

1

The function returns a Return Code of 1 if either row and col parameter values are out of screen coordinates range (when the intended conversion is row and column coordinates to host presentation space positional value) or row parameter value is out of presentation space positional value range (when the intended conversion is in the opposite direction). In both cases, the upper limit for valid input depends on how the host presentation space is configured and the lower limit is 1.

 

 

 

 

Remarks

 

1.This function is equivalent to HLLAPI Function Number 99.
2. To find out how many rows and columns are in your presentation space, examine the returned object in querySessionStatus.