Generate Profile Token From Profile Token (QSYGENFT, QsyGenPrfTknFromPrfTkn) API


  Required Parameter Group for QSYGENFT:

1 New profile token Output Char(32)
2 From profile token Input Char(32)
3 Time out interval Input Bin(4)
4 New profile token type Input Char(1)
5 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: Yes



  Syntax for QsyGenPrfTknFromPrfTkn:
 #include <qsyptkn.h>

 void QsyGenPrfTknFromPrfTkn
        (unsigned char  *New_profile_token,
         unsigned char  *From_profile_token,
         int            *Time_out_interval,
         char           *New_profile_token_type,
         void           *Error_code);

  Service Program: QSYPTKN

  Default Public Authority: *USE

  Threadsafe: Yes

The Generate Profile Token From Profile Token (OPM, QSYGENFT; ILE, QsyGenPrfTknFromPrfTkn) API generates a profile token using an existing profile token. The existing profile token must be a valid, multiple-use, regenerable profile token. The new profile token will represent the same user and group information as the original profile token.


Authorities and Locks

API Public Authority
*USE

Required Parameter Group

Profile token
OUTPUT; CHAR(32)

The profile token that is generated.

From profile token
INPUT; CHAR(32)

The multiple-use, regenerable profile token used to generate the new profile token.

Time out interval
INPUT; BINARY(4)

The time in seconds before the new profile token times out.

You can specify one of the following values:

-1 Use system default value (3600 seconds)
1-3600 Time out value in second.

New profile token type
INPUT; CHAR(1)

You can specify one of the following values:

1 Single-use profile token. A single-use profile token can be used only on the Set To Profile Token (QSYSETPT; QsySetToProfileToken) API once and cannot be used to generate new profile tokens.
2 Multiple-use profile token. A multiple-use profile token can be used on the Set To Profile Token (QSYSETPT; QsySetToPrfTkn) API an unlimited number of times, but cannot be used to generate new profile tokens.
3 Multiple-use, regenerable profile token. A multiple-use, regenerable profile token can be used on the Set To Profile Token (QSYSETPT; QsySetToPrfTkn) API an unlimited number of times and can be used to generate a new single-use, multiple-use, or multiple-use, regenerable profile token.

Error code
I/O; CHAR(*)

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


Error Messages

Message ID Error Message Text
CPF2225 E Not able to allocate internal system object.
CPF2274 E Profile token not valid.
CPF229F E Profile token not valid type.
CPF3CF1 E Error code parameter not valid.
CPF3C36 E Number of parameters, &1, entered for this API was not valid.
CPF3C90 E Literal value cannot be changed.
CPF4AAA E Maximum number of profile tokens have been generated.
CPF4AAB E Time out value not valid.
CPF4AAD E Profile token type not valid.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


API introduced: V4R5

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