Retrieve View File (QteRetrieveViewFile) API


  Required Parameter Group:

1 Text descriptor receiver variable Output Char(*)
2 Length of text descriptor receiver variable Input Binary(4)
3 File name receiver variable Output Char(*)
4 Length of file name receiver variable Input Binary(4)
5 Format of file name receiver variable Input Char(8)
6 View ID Input Binary(4)
7 Error code I/O Char(*)

  Service Program: QTEDBGS

  Threadsafe: No

The Retrieve View File (QteRetrieveViewFile) API is used to retrieve all the files and text information necessary to construct the text for the entire view specified by the view ID parameter. A list of text descriptors is returned. Each text descriptor describes where a piece of text for the view comes from, either from a file specified in the file name receiver variable or from supplied text that may be obtained using the Retrieve View Text API.


Authorities and Locks

None.


Required Parameter Group

Text descriptor receiver variable
OUTPUT; CHAR(*)

The output variable containing the list of text descriptors, which describe how the specified view is constructed. For more information, see Format of Text Descriptor Receiver Variable.

Length of text descriptor receiver variable
INPUT; BINARY(4)

The length in bytes of the text descriptor receiver variable parameter. The minimum length is 8 bytes.

File name receiver variable
OUTPUT; CHAR(*)

The output variable containing the list of files referenced by the text descriptor receiver variable.

Length of file name receiver variable
INPUT; BINARY(4)

The length in bytes of the file name receiver variable. The minimum length is 8 bytes.

Format of file name receiver variable
INPUT; CHAR(8)

The content and format of the information to be supplied by the API in the file name receiver variable. The only valid value is:

RVFN0100 Format of file name receiver variable

For more information, see Format of File Name Receiver Variable.

View ID
INPUT; BINARY(4)

The identifier of a previously registered view obtained by using the Register Debug View API.

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 Text Descriptor Receiver Variable

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 BINARY(4) Number of text descriptor entries
Note: The following three fields are repeated the number of times specified in the number of text descriptor entries field.
    BINARY(4) File name index
    BINARY(4) Line number
    BINARY(4) Number of lines


Format of File Name Receiver Variable

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 BINARY(4) Number of file name entries
Note: The following eight fields are repeated the number of times specified on the number of file name entries field.
    BINARY(4) Offset of file name
    BINARY(4) Length of file name
    CHAR(8) File format name
    BINARY(4) External or IBM® i IFS file flag
    BINARY(4) CCSID of file name
    CHAR(2) Country or region ID of file name
    CHAR(3) Language ID of file name
    CHAR(3) Reserved
Note: The file names buffer follows all file name entries.
    CHAR(*) File names buffer


Field Descriptions

Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.

Bytes returned. The number of bytes of data returned.

CCSID of file name. The CCSID the file name is in. The value of this field is only valid for file format name RTVF0200.

Country or region ID of file name. The country or region ID of the file name. The value of this field is valid for file format name RTVF0200 only.

External or IFS file flag. Whether the file is an IBM i integrated file system file or an external file. A value of 0 means external file; a value of 1 means IBM i integrated file system file. The value of this field is valid only for file format name RTVF0200.

File names buffer. A list of file names from which text should be retrieved.

File name index. An index into the file name receiver variable array. 0 is the first file entry in the file name receiver variable. If the index is -1, the text comes from supplied text.

File format name. The format of a file in the file names buffer. Possible formats are:

RTVF0100 IBM i file (see RTVF0100 Format)
RTVF0200 External or IBM i HFS file (see RTVF0200 Format)

Language ID of file name. The language ID of the file name. The value of this field is valid only for file format name RTVF0200.

Length of file name. The length in bytes of a file name in the file names buffer.

Line number. The line number in the file that is referenced by the file name index to start reading text from. If the file name index is -1, this specifies the line number in the view where the supplied text can be retrieved using the QteRetrieveViewText API.

Number of file name entries. The number of entries returned in the file name receiver variable.

Number of lines. The number of lines of text described by the text descriptor. The number of lines to read from the file, which is the number of lines of supplied text to be retrieved using the QteRetrieveViewText API.

Number of text descriptor entries. The number of entries returned in the receiver variable. The file name index, line number, and number of lines fields are repeated this number of times.

Offset of file name. From the start of the file names buffer, the start of a file name.


Formats of File Format Name

RTVF0100 Format

Offset Type Field
Dec Hex
0 0 CHAR(10) IBM i file name
10 A CHAR(10) IBM i library
20 14 CHAR(10) IBM i member name


Field Descriptions

IBM i file name. The name of an IBM i file from which text should be retrieved. It is an IBM i object name, left-justified, and padded with blanks.

IBM i library. The name of a library that contains the file from which text should be retrieved. It is an IBM i object name, left-justified, and padded with blanks.

IBM i member name. The name of the member of the file from which text should be retrieved. It is an IBM i object name, left-justified, and padded with blanks.


RTVF0200 Format

Offset Type Field
Dec Hex
0 0 CHAR(*) External file or IBM i integrated file system file name


Field Description

External file or IBM i integrated file system file name. The name of an external file or IBM i integrated file system file from which text should be retrieved. The value of this field is valid only for file format name RTVF0200.


Error Messages

Message ID Error Message Text
CPF3C21 E Format name &1 is not valid.
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.
CPF9542 E View not found.
CPF9549 E Error addressing API parameter.
CPF954A E No source text available.


API Introduced: V3R1

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