z/OS Cryptographic Services System SSL Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


gsk_get_record_by_index()

z/OS Cryptographic Services System SSL Programming
SC14-7495-00

Gets a database record using a sequential index.

Format

   #include <gskcms.h>

   gsk_status gsk_get_record_by_index (   
                                        gsk_handle              db_handle,
                                        int                     index,
                                        gskdb_record **         record)

Parameters

db_handle
Specifies the database handle returned by the gsk_create_database() routine, the gsk_open_database() routine, or the gsk_open_keyring() routine.
index
Specifies the sequential index of the record. The first record in the database is record 1.
record
Returns the database record. The application should call the gsk_free_record() routine to release the record when it is no longer needed.

Results

The function return value will be 0 if no error is detected. Otherwise, it will be one of the return codes listed in the gskcms.h include file. These are some possible errors:
[CMSERR_BAD_HANDLE]
The database handle is not valid.
[CMSERR_NO_MEMORY]
Insufficient storage is available.
[CMSERR_RECORD_NOT_FOUND]
The requested record is not found.

Usage

The gsk_get_record_by_index() routine retrieves a record from a key or request database based upon a sequential index number. The first record in the database is record 1. The index numbers will change as records are added and deleted.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014