Retrieve Function Information (QSYRTVFI, QsyRetrieveFunctionInformation) API


  Required Parameter Group for QSYRTVFI:


  Default Public Authority: *USE

  Threadsafe: Yes



  Syntax for QsyRetrieveFunctionInformation:
 #include <qsyfnusg.h>

 void QsyRetrieveFunctionInformation
        (char            Continuation_handle[20],
         void           *Receiver_variable,
         int            *Length_of_receiver_variable,
         char            Format_name[8],
         Qsy_Selcrtr_T  *Function_selection_criteria,
         int            *Desired_CCSID,
         void           *Error_code);

  Service Program: QSYFNUSG
  Default Public Authority: *USE

  Threadsafe: Yes

The Retrieve Function Information (OPM, QSYRTVFI; ILE, QsyRetrieveFunctionInformation) API retrieves information about one or more functions.

The QSYS2.FUNCTION_INFO view can be used as an alternative to this API. See FUNCTION_INFO view for more information.


Authorities and Locks

API Public Authority
*USE
Function Registration Lock
*SHRNUP

Required Parameter Group

Continuation handle
INPUT; CHAR(20)

The value returned to the user in the receiver variable when only partial exit information is returned. This parameter must be set to blanks on the first call to this API. This parameter is used when more information is available to return than what could fit in the receiver variable. When you specify a continuation handle for this parameter, all other parameters must have the same values as the call to the API that generated the continuation handle. Failure to do so may result in incomplete or inaccurate information.

Entries are only returned in their entirety; the API never returns anything less. If there is not enough space for the entire entry, the continuation handle is set to something other than blanks.

Receiver variable
OUTPUT; CHAR(*)

The variable that is to receive the function information requested.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable. If the length is larger than the size of the receiver variable, the results may not be predictable. The minimum length is 8 bytes.

Format name
INPUT; CHAR(8)

The format of the function information to be returned.

You must use the following format name:


Function selection criteria
INPUT; CHAR(*)

The selection criteria to be used when selecting which functions are returned. No CCSID normalization is performed. It is recommended that you use characters from the invariant character set for the comparison data.

The information must be in the following format:


Desired CCSID
INPUT; BINARY(4)

The CCSID the returned text fields should be converted to. The text fields will be returned in this CCSID even if data loss occurs. If you want to ensure that data loss does not occur, you may specify 65535 or 13488 (UCS-2).

The following can be specified for the desired CCSID:


Error code
I/O; CHAR(*)

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


FCNI0100 Format

The following information is returned for the FCNI0100 format. This format provides information about a function. For a detailed description of each field, see Field Descriptions.



Field Descriptions

*ALLOBJ indicator. Whether a user with *ALLOBJ special authority can use the function. If this is not an administrable function, then this field is blank.

The possible values follow:

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

If the continuation handle is set to a value other than blanks, this field contains an approximation of the total bytes available. At a minimum, this field contains the actual number of bytes available.

Bytes returned. The number of bytes of data returned.

Continuation handle. The handle that is returned when more data is available to return, but the receiver variable is not large enough. The handle indicates the point in the repository that the retrieval stopped. If the handle is used on the next call to the API, the API returns more data starting at the point that the handle indicates. This field is set to blanks when all information is returned.

Default usage. The default usage for the function. The default usage is used if the user or one of its groups does not have a specific usage setting. If this is not an administrable function, then this field is blank.

The possible values follow:

Function category. Whether the function is a client or host function.

The possible values follow:


Function description. The text for the function description. This value is converted to the CCSID value specified in the desired CCSID parameter.

Function description CCSID. The CCSID value that is associated with the function description in the registration facility.

Function-description message-file name. The name of the message file that contains the function description. If no message file name is specified, this field contains blanks.

Function-description message-file library name. The name of the library in which the function description message file resides. If no message file name is specified, this field contains blanks.

Function-description message ID. The message identifier for the function description. If no message file name is specified, this field contains blanks.

Function-description message text. The first-level text for the function-description message ID. This value is converted to the CCSID value specified in the desired CCSID parameter.

When the message text is retrieved from the message file, the message file library is added to the product portion of the library list, and *LIBL is specified for the library name. If the library cannot be added to the product portion of the library list, then *LIBL is still used to search for the message. If the message is not found, then the message file library is searched for the message.

If no message file name is specified, this field contains blanks.

Function-description message-text CCSID. The CCSID value that the function-description message text is stored in.

Function group ID. The ID of the function group that the function is grouped with. If the function is not grouped with a function group, this field is set to *NONE.

Function ID. The function ID.

Function name. The text for the function name. This value is converted to the CCSID value specified in the desired CCSID parameter.

Function name CCSID. The CCSID value that is associated with the function name in the registration facility.

Function-name message-file name. The name of the message file that contains the function name. If no message file name is specified, this field contains blanks.

Function-name message-file library name. The name of the library in which the function name message file resides. If no message file name is specified, this field contains blanks.

Function-name message ID. The message identifier for the function name. If no message file name is specified, this field contains blanks.

Function-name message text. The first-level text for the function-name message ID. This value is converted to the CCSID value specified in the desired CCSID parameter.

When the message text is retrieved from the message file, the message file library is added to the product portion of the library list, and *LIBL is specified for the library name. If the library cannot be added to the product portion of the library list, then *LIBL is still used to search for the message. If the message is not found, then the message file library is searched for the message.

If no message file name is specified, this field contains blanks.

Function-name message-text CCSID. The CCSID value that the function-name message text is stored in.

Function product ID. The ID of the product that the function is registered for.

Function type. The type of function.

The possible values follow:

Length of function entry. The length of a function entry that is returned. This value should be used in determining the displacement to the next function entry.

Number of function entries returned. The number of function entries returned. If the receiver variable is not large enough to hold all of the information, this number contains only the number of function entries actually returned.

Offset to first function entry. The offset to the first function entry returned. The offset is from the beginning of the structure. If no entries are returned, the offset is set to zero.

Reserved. An ignored field.

Usage information indicator. Whether there is usage information defined for the function. Usage information is the list of users and groups that have a specific usage setting specified for the function. Usage information is set using the Change Function Usage Information (OPM, QSYCHFUI; ILE, QsyChangeFunctionUsageInfo) API. If this is not an administrable function, then this field is blank.

The possible values follow:



Format for Function Selection Criteria

This table shows the format for the function selection criteria parameter. For a detailed description of each field, see Field Descriptions.



Field Descriptions

Comparison data. The data to compare to the function information.

Comparison operator. The comparison value to be used when comparing the function information with the comparison data.

The following value can be specified:

Function control key. The function control to be compared. Refer to Function Control Keys for more information.

Length of comparison data. The length of the data to compare to the function information. The length of the comparison data must be valid for the function control key that is specified.

Size of criteria entry. The size of the selection criteria entry, including this field.


Function Control Keys

The following table shows the valid function control keys for the key field area of the selection control record. For a detailed description of each field, see Field Descriptions.



Field Descriptions

Function category. The category of the function.

The possible values are:

Function group ID. All functions that have this function group are selected. The special value of *NONE can be specified to select functions that do not have a function group specified.

Function ID. The name of the functions to select.

The following can be specified for the function ID:

Function product ID. All functions that have this function product are selected.

Function type. The type of function.

The possible values are:



Error Messages



API introduced: V4R3

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