Start of changeCreate Key Store (QC3CRTKS, Qc3CreateKeyStore)


  Required Parameter Group:

1 Qualified key store file name Input Char(20)
2 Master key ID Input Binary(4)
3 Public authority Input Char(10)
4 Text description Input Char(50)
5 Error code I/O Char(*)

 Service Program Name: QC3KSCRT

 Default Public Authority: *USE

 Threadsafe: Yes

The Create Key Store (OPM, QC3CRTKS; ILE, Qc3CreateKeyStore) API creates a database file for storing cryptographic key values for use with the cryptographic services set of APIs.

For more information about cryptographic services key store, refer to Cryptographic Services Key Store.


Authorities and Locks

Required library authority
*EXECUTE, *ADD


Required Parameter Group

Qualified key store file name
INPUT; CHAR(20)

The key store file to be created. The first 10 characters contain the file name. The second 10 characters contain the name of the library in which the key store file will be located.

You can use the following special value for the library name.

*CURLIB The job's current library is used for the key store file. If no library is specified as the current library for the job, the QGPL library is used.

Master key ID
INPUT; BINARY(4)

The master key under which the key values will be encrypted before storing in the key store file. The master key IDs are

1 Master key 1
2 Master key 2
3 Master key 3
4 Master key 4
5 Master key 5
6 Master key 6
7 Master key 7
8 Master key 8

Public authority
INPUT; CHAR(10)

The authority you give to users who do not have specific private or group authority to the key store file.

*ALL The user can perform all authorized operations on the key store file.
Authorization list name The key store file is secured by the specified authorization list, and its public authority is set to *AUTL.
*CHANGE The user has read, add, update, and delete authority for the key store file and can read the object description.
*EXCLUDE The user cannot access the key store file in any way.
*LIBCRTAUT The public authority for the key store file is taken from the CRTAUT value for the target library when the file is created.
*USE The user can read the object description and contents, but cannot change the key store file.

Text description
INPUT; CHAR(50)

A brief description of the key store file.

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
CPF24B4 E Severe error while addressing parameter list.
CPF3C1E E Required parameter &1 omitted.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPF9D9D E Unexpected error while setting keystore attributes.
CPF9DA0 E Error occured opening key store file.
CPF9DAD E The master key ID is not valid.
CPF9DB3 E Qualified key store file name not valid..
CPF9DB4 E Value &1 for public authority is not valid.
CPF9DB5 E Key store file &1 not created.
CPF9DB7 E Error occured writing to key store.

End of change

API introduced: V5R4
Top | Cryptographic Services APIs | APIs by category