Add View Text (QteAddViewText) API


  Required Parameter Group:


  Default Public Authority: *USE

  Service Program: QTECRTVS

  Threadsafe: No

The Add View Text (QteAddViewText) API is used to describe a piece of text of a previously added view. As a processor reads its input source, it creates at least one view. This API is issued to add the directions for re-creating the text of these views. For the debugger to show the text that makes up a view, the location of the pieces of text that make up the view must be specified.

When the view is reconstructed by the debugger, the pieces of text will be retrieved and concatenated into a single piece of text, following the directions given when this API is called. Thus, when it is mentioned that text is copied, it is referring to a later time, when the view is reconstructed.

All the text for a view must be added at once, with one call to this API. For this reason, the text must be built up in a buffer as the processor produces its output. At the end of view creation, all text is then supplied to this API.

If any text comes from files, the file descriptors must have been previously added to the view with the Add View File (QteAddViewFile) API.

See documentation on Set Encryption Key (QteSetEncryptionKey) and Set Decryption Key (QteSetDecryptionKey) APIs for information on encrypting debug view data.


Authorities and Locks

None.


Required Parameter Group

View number
INPUT; BINARY(4)

The number of the view to which a piece of text is being added. This number must be the same as the number previously returned by the Add View Description API.

Text descriptor buffer
INPUT;CHAR(*)

The input variable containing the text descriptors. Text descriptors define the location of text used to build the view specified in the view name parameter.

Number of entries
INPUT;BINARY(4)

The number of text descriptors that are provided in the text descriptor buffer parameter.

Many pieces of text may be described in a single text descriptor buffer. However, each entry must represent a single piece of contiguous text, and this parameter must be a count of the number of entries provided.

Each entry must contain all fields indicated, but, depending on the type of text being described by the entry, certain fields will not be used by the API.

If any text is supplied by the calling program, it is identified by a text descriptor, but the text itself is contained in the supplied text buffer.

Format name
INPUT; CHAR(8)

The content and format of the information supplied by the calling program in the text descriptor buffer. The valid values for format name are:

Begin of change End of change
Supplied text buffer
INPUT; CHAR(*)

The input variable that is to be passed to the API, containing the text that is supplied when a text descriptor in the text descriptor buffer parameter indicates that text is supplied. Text descriptors within the text descriptor buffer refer to text locations within this buffer by the offset from the beginning of the buffer. The piece of text is ended by a NULL (hex 00) character. To conserve storage, delete the trailing blanks in lines of supplied text, and end the text with a null character.

Note: A line of supplied text must not be more than 255 characters in length, not counting the NULL character.

Length of text buffer
INPUT; BINARY(4)

The length of the supplied text buffer.

Error code
I/O; CHAR(*)

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


TXTA0100 Format



TXTA0101 Format



TXTA0102 Format



TXTA0103 Format



Begin of changeTXTA0104 Format



TXTA0105 Format



TXTA0106 Format



Field Descriptions

Continuation flag. The flag defined to indicate whether this line is a continuation of previous line. Possible values are:

Ending line of the range. The number of the line where the range ends.

End of change

File index. A file member added by the Add View File API. This field is required if the text location is set to *FILE; otherwise, it is ignored. The first file added for the specified view is file 0, the second is file 1, and so forth.

When the view has a previous view, file 0 should not be specified. File 0 is assumed to mean a line in the previous view because the first file specified in the file descriptor must be the root source file used to construct this view. This root source file is the same as the previous view. Instead, *PREVIOUS should be specified in the text location field. If file 0 is specified instead of the previous view and the previous view was created by another preprocessor that created a temporary file as its output, that file may not exist at run time. In that case, text for the view could not be retrieved. However, if *PREVIOUS is specified, the View Retrieval API can use the text descriptors of the output view created by the preprocessor to reconstruct the text.

Note: The source debugger support does not validate the existence of this file. It merely uses the name in the view information to refer to the location of debug data. When the text of the view is reconstructed, text will be retrieved from the file named in this parameter (and the member name parameter), and the file name will be validated at that time.

From line. The line number where text is located. If the text location is a file, this is the line number in that file. If the text location is a previous view, this is the line position within that view. This can be thought of as the start line position. This field is required if the text location is set to *FILE or *PREVIOUS.

Number of lines. The number of lines of text being described. It is intended that views be created in order, where each piece of text comes directly after the previous text added. This field is required when text location is set to *FILE or *PREVIOUS.

Begin of changeNumber of range array elements. The number of elements in the range array.

End of change

Procedure dictionary ID. The dictionary number of the procedure where the statement is located.

Reserved. Reserved for future use.

Begin of changeSource line format. The format type of the source line. Possible values are:

Starting line of the range. The number of the line where the range begins.

End of change

Starting offset. The location within the supplied text buffer of the start of the supplied text. This is an offset from the beginning of the buffer to the start of the text. This field is required if the text location is set to *SUPPLIED in the TXTA0100 format.

Statement number. The HLL statement number of the statement.

Statement type. The type of the statement being added. Possible values are:

Text location. The location of the text being referred to. This field is required for all entries.



Error Messages



API introduced: V4R2

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