Change Function Usage Information (QSYCHFUI, QsyChangeFunctionUsageInfo) API


  Start of changeRequired Parameter Group for QSYCHFUI:

1 Function ID Input Char(30)
2 Format name Input Char(8)
3 Function usage information Input Char(*)
4 Length of function usage information Input Binary(4)
5 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: Yes



  Syntax for QsyChangeFunctionUsageInfo:
 #include <qsyfnusg.h>

 void QsyChangeFunctionUsageInfo
        (char     Function_ID[30],
         char     Format_name[8],
         void    *Function_usage_information
         int     *Length_of_function_usage_information,
         void    *Error_code);

  Service Program: QSYFNUSG

  Default Public Authority: *USE

  Threadsafe: YesEnd of change

The Change Function Usage Information (OPM, QSYCHFUI; ILE, QsyChangeFunctionUsageInfo) API changes the usage information for a function. The usage information for a function indicates which user profiles are allowed or not allowed to use a function.

The usage information is stored with the user profile. To save and restore the usage information, you must use the same methods as with other user profile information (Save Security Data (SAVSECDTA) command, Restore User Profiles (RSTUSRPRF) command, Restore Authority (RSTAUT) command).


Authorities and Locks

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

Required Parameter Group

Function ID
INPUT; CHAR(30)

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

Format name
INPUT; CHAR(8)

The format of the function usage information.

The valid value is:

CFUI0100 Function usage information

Function usage information
INPUT; CHAR(*)

The usage information that is being changed for the specified function. See CFUI0100 Format for the definition of the fields for this parameter.

Length of function usage information
INPUT; BINARY(4)

The length of the function usage information. This area must be as large as the format specified.

Error code
I/O; CHAR(*)

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


CFUI0100 Format

The following table shows the information that must be specified in the function usage information parameter when format CFUI0100 is specified. For a detailed description of each field, see Field Descriptions.

Offset Type Field
Dec Hex
0 0 BINARY(4) Number of usage information entries
Usage information entry. These fields are repeated for each usage information entry returned.
    CHAR(10) User profile name
    CHAR(1) Usage setting


Field Descriptions

Number of usage information entries. The total number of usage information entries. This value must be greater than 0.

Usage information entries. The entries that contain the usage information.

Usage setting. Whether the user is allowed to use the function or not.

The following values can be specified:

0 The user's previous setting is removed.
1 The user is not allowed to use the function.
2 The user is allowed to use the function.

User profile name. The name of the user profile whose usage setting is being changed. The user profile must exist.


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.
CPF229C E Not all usage information changed for function &1.
CPF3C21 E Format name &1 is not valid.
CPF3C3C E Value for parameter &1 not valid.
CPF3C36 E Number of parameters, &1, entered for this API was not valid.
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.
CPF3C90 E Literal value cannot be changed.
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
Top | Security APIs | APIs by category