Change Function Usage (CHGFCNUSG)

The Change Function Usage (CHGFCNUSG) command changes the allowed usage information of a registered function. Functions can be registered by using the Register Function (QSYRGFN) API.

Some functions provide other means to authorize users to the function. For example, a user that is not allowed to use the Service Trace (QIBM_SERVICE_TRACE) function will still be allowed to use the Trace Internal (TRCINT) command if they have service (*SERVICE) special authority.

Restrictions: You must have security administrator (*SECADM) special authority to use this command.

Parameters

Keyword Description Choices Notes
FCNID Function ID Name Required, Positional 1
USER User Simple name Optional
USAGE Usage *ALLOWED, *DENIED, *NONE Optional
DEFAULT Default authority *SAME, *ALLOWED, *DENIED Optional
ALLOBJAUT *ALLOBJ special authority *SAME, *USED, *NOTUSED Optional

Function ID (FCNID)

Specifies the function identifier for which the usage information is to be changed.

This is a required parameter.

name
Specify the name of the function ID for which the usage information is to be changed.

User (USER)

Specifies the name of the user profile whose function usage information is to be changed.

name
Specify the name of the user profile whose function usage information is to be changed.

Usage (USAGE)

Specifies the allowed usage of the user profile specified for the User (USER) parameter.

*ALLOWED
The user profile is allowed to use the function.
*DENIED
The user profile is not allowed to use the function unless the function provides some other way to authorize users.
*NONE
The user profile will not be explicitly allowed or denied usage of the function.

Default authority (DEFAULT)

Specifies 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.

*SAME
The value does not change.
*ALLOWED
User profiles without a usage setting for the function are allowed to use the function.
*DENIED
User profiles without a usage setting for the function are not allowed to use the function unless the function provides some other way to authorize users.

*ALLOBJ special authority (ALLOBJAUT)

Specifies whether all object (*ALLOBJ) special authority may be used to give a user access to the function.

*SAME
The value does not change.
*USED
A user with *ALLOBJ special authority is always allowed to use the function.
*NOTUSED
For a user with *ALLOBJ special authority to use the function, the usage information specified for the function must indicate that the user is allowed to use the function for one of the following reasons:
  • the user is allowed usage,
  • one of its groups is allowed usage, or
  • the default setting is to allow usage.

Examples

CHGFCNUSG   FCNID(QIBM_SERVICE_TRACE)  DEFAULT(*DENIED)
            USER(QSRVBAS)  USAGE(*ALLOWED)

This command denies access to the QIBM_SERVICE_TRACE function for the default user. It also allows the QSRVBAS user profile to use the function.

Error messages

*ESCAPE Messages

CPF2204
User profile &1 not found.
CPF2225
Not able to allocate internal system object.
CPF222E
&1 special authority is required.
CPF228A
Function &1 not registered.
CPF229B
Operation not allowed for function &1.
CPF229D
Operation not allowed on user profile &1.
CPF3CD9
Requested function cannot be performed at this time.
CPF3CDA
Registration facility repository not available for use.