Add Symbol List (QteAddSymbolList) API


  Required Parameter Group:


  Service Program: QTECRTVS

  Threadsafe: No

The Add Symbol List (QteAddSymbolList) API is used to add the symbols defined in a specified block and their map information to the view space. When the preprocessor translates the input view to generate the output view, if it wants the translated symbols in the input view can be debugged, it can add those symbols and their map information to debug data by using this API. If the target symbols need qualifiers when accessing them, they must be added to the symbol list in qualified form. When a symbol defined in blocks is referred in a debug command, the symbol list will be searched to find out which symbol in the target view it will be mapped to and eventually the map target symbol will be used instead. When this API is called, the block where the adding symbols are defined must exist.

All the symbols defined in one block must be added at once, in one call to this API. For this reason, the symbols must be built up in a buffer as the preprocessor produces its output. When all the map information for the block is collected, it can be supplied to this API.


Authorities and Locks

None.


Required Parameter Group

Block number
INPUT; BINARY(4)

The number of the block which the symbols are defined in. This block must have been added previously by QteAddBlock API. For global symbols in the source region there is no block that explicitly encloses them. Set 0 for this parameter to indicate they are defined in block 0, which is the outmost block for a source region.

Symbol entry buffer
INPUT; CHAR(*)

The input variable containing the symbol list which are defined in the specified block.

Number of symbol entries
INPUT; BINARY(4)

The number of entries in the symbol entry buffer parameter.

Format name
INPUT; CHAR(10)

The format name of the information supplied by the calling program in the symbol entry buffer parameter. Valid values for format name are:

SYMFMT0100  Used to add symbol map information.

For more information, see SYMFMT0100 Format.

Symbol name buffer
INPUT; CHAR(*)

The buffer containing symbol names. The symbol entry within the symbol entry buffer will refer symbol locations in this buffer by the offset from the beginning of the symbol name buffer. The descriptors also specify the symbol name length. Thus every symbol can be retrieved from this buffer by its offset and length.

Symbol name buffer size
INPUT; BINARY(4)

The length of the symbol name buffer.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of this structure, see Error code parameter.


SYMFMT0100 Format



Field Descriptions

Symbol offset. The offset of the symbol name from the beginning of the symbol name buffer.

Symbol length. The length of the symbol name in the symbol name buffer. The length value is in bytes.

Symbol line number. The line number in which the symbol is defined.

Map target symbol offset. The offset of the symbol name which the current symbol is mapped to. The offset is based upon the beginning of the buffer.

Map target symbol length. The length of the symbol name which the current symbol is mapped to. The length value is in bytes.

Map target symbol line number. The line number where the map target symbol is defined. This value is used to locate the block where the target symbol is declared. It does not need to be the actual line number. Any line number in the block is OK.

Indicator offset. SQL preprocessor will generate an indicator for a SQL variable. This field keeps the offset of the indicator name for the current symbol. The offset is based upon the beginning of the buffer. If no indicator is generated, this field should be set to -1.

Indicator length. The length of the indicator name in the symbol name buffer. The length value is in bytes. If no indicator is generated for the current symbol, the length value is undefined.

Type identifier. The identifier used to refer to the type information associated with the current symbol. Only types added to the current source region can be referred to. A value of 0 means no type information is associated with the current symbol.



Error Messages

Message ID Error Message Text
CPF3C21 E Format name &1 is not valid.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF9CA4 E Block does not exist.
CPF9542 E View not found.
CPF9549 E Error addressing API parameter.
CPF9CA6 E Symbol location not valid.
CPF9556 E API not valid at this time.
CPF9CA7 E Block already contains symbol list.
CPF955B E Number of entries not valid.
CPF9CA8 E Symbol name buffer size not valid.
CPF955D E View data overflow. All debug data lost.


API introduced: V7R3

[ Back to top | Debugger APIs | APIs by category ]