Retrieve Function Usage Information (QSYRTFUI, QsyRetrieveFunctionUsageInfo) API


  Required Parameter Group for QSYRTFUI:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Format name Input Char(8)
4 Function ID Input Char(30)
5 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: Yes



  Syntax for QsyRetrieveFunctionUsageInfo:
 #include <qsyfnusg.h>

 void QsyRetrieveFunctionUsageInfo
        (void    *Receiver_variable,
         int     *Length_of_receiver_variable,
         char     Format_name[8],
         char     Function_ID[30],
         void    *Error_code);

  Service Program: QSYFNUSG
  Default Public Authority: *USE

  Threadsafe: Yes

The Retrieve Function Usage Information (OPM, QSYRTFUI; ILE, QsyRetrieveFunctionUsageInfo) API retrieves usage information for a function.


Authorities and Locks

API Public Authority
*USE
Authority Required
*SECADM special authority
Usage Information Lock
*SHRNUP

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable that is to receive the function usage information.

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 usage information to be returned.

You must use the following format name:

FNUI0100 Format Function usage information
Function ID
INPUT; CHAR(30)

The ID of the function for which usage information is being retrieved.

Error code
I/O; CHAR(*)

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


FNUI0100 Format

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

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 BINARY(4) Offset to first function usage entry
12 C BINARY(4) Number of function usage entries returned
16 10 BINARY(4) Length of function usage entry
20 14 CHAR(*) Reserved
Function usage entry information. These fields are repeated for each function usage entry returned.
    CHAR(10) User profile name
    CHAR(1) Usage setting
    CHAR(1) User profile type
    CHAR(*) Reserved


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.

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

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

Offset to first function usage entry. The offset to the first function usage 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 setting. Whether the user profile is allowed to use the function or not.

The possible values follow:

1 The user profile is not allowed to use the function.
2 The user profile is allowed to use the function.

User profile name. The name of the user profile that has a usage setting for this function.

User profile type. Whether the user profile is a user or a group.

The possible values follow:

0 The user type is unknown. This value is returned if an error occurred while determining the type of user.
1 The user profile is a user (does not have a GID value).
2 The user profile is a group (has a GID value).

Error Messages

Message ID Error Message Text
CPF2225 E Not able to allocate internal system object.
CPF222E E &1 special authority is required.
CPF228A E Function &1 not registered.
CPF229B E Operation not allowed for function &1.
CPF3C19 E Error occurred with receiver variable specified.
CPF3C21 E Format name &1 is not valid.
CPF3C24 E Length of the receiver variable is not valid.
CPF3C36 E Number of parameters, &1, entered for this API was not valid.
CPF3C90 E Literal value cannot be changed.
CPF3CD9 E Requested function cannot be performed at this time.
CPF3CDA E Registration facility repository not available for use.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF8100 E All CPF81xx messages could be returned. xx is from 01 to FF.
CPF9810 E Library &1 not found.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


API introduced: V4R3

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