Map View Position (QteMapViewPosition) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 From view ID Input Binary(4)
4 From line number Input Binary(4)
5 From column number Input Binary(4)
6 To view ID Input Binary(4)
7 Error code I/O Char(*)

  Default Public Authority: *USE

  Service Program: QTEDBGS

  Threadsafe: No

The Map View Position (QteMapViewPosition) API maps positions from one view to another view within the same program and module. A specified position in the view identified in the from view ID parameter is used for the mapping. The position is specified as a line number and a column number in the from view ID.

A position in one view can map to more than one position in another view. For example, an SQL statement in the SQL input source view may map to many positions in the C input source view.This is because a single SQL statement may distribute source throughout the output of the SQL processor.

One or more positions in the to view ID are returned as a line number and a column number.


Authorities and Locks

None.


Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable that is to receive the information requested. You can specify the size of this area to be smaller than the format requested if you specify the length of receiver variable parameter correctly. As a result, the API returns only the data that the area can hold. For more information on the size and format of the receiver variable, see Format of Receiver Variable.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable. The minimum length is 8 bytes.

It is suggested that a receiver variable length be given that is large enough to hold one map element. Because this is normally the number of elements returned, a single call to this API is usually sufficient.

From view ID
INPUT; BINARY(4)

The identifier of a previously registered view, which is obtained using theRegister Debug View API. This ID specifies the from view in the mapping function provided.

From line number
INPUT; BINARY(4)

The line number in the view specified by the from view ID parameter mapped to aline number in the view specified by the to view ID parameter.

If the information in the from view ID parameter is a statement view, this parameter represents the line number in the statement view.

Note: The statement view is the lowest level view. Breakpoints, steps, and unmonitored exceptions are reported as a line number within this view. Therefore, the statement view must exist and be registered to accomplish source level debugging.

From column number
INPUT; BINARY(4)

The position in the line specified by the from line number parameter. Column numbers are 1 through 255.

If the from view ID parameter is a statement view, this parameter is not used and should be set to column one.

To view ID
INPUT; BINARY(4)

The identifier of a previously registered view, which is obtained using the Register Debug View API. This specifies the to view in the mapping function provided.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter.


Format of Receiver Variable

The following table shows the information supplied in the receiver variable parameter.

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 BINARY(4) Number of map elements
Note: The following fields are repeated for each map element.
    BINARY(4) Line number
    BINARY(4) Column number


Field Descriptions

Bytes available. The number of bytes of data available to be returned to the user.

Bytes returned. The number of bytes of data returned to the user.

Column number. The column number within the from line number parameter that maps to the current position in the to view ID parameter. Column numbers are 1 through 255.

If the view is a statement view, this number is not used and is set to column one.

Line number. The line number in the view specified by the to view ID parameter.

Number of map elements. Theline number and column number fields are repeated this number of times, once for each map available.


Error Messages

Message ID Error Message Text
CPF3C24 E Length of the receiver variable is not valid.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF9541 E Not in debug mode.
CPF9543 E From view not found.
CPF9544 E To view not found.
CPF9548 E Map not available.
CPF9567 E Column number not valid.
CPF9568 E Line number not valid.
CPF9549 E Error addressing API parameter.


API introduced: V2R3
Top | Debugger APIs | APIs by category