QsyChangeValidationLstEntry()--Change Validation List Entry API


  Syntax
  #include <qsyvldl.h>

  int QsyChangeValidationLstEntry
         (Qsy_Qual_Name_T             *Validation_Lst,
          Qsy_Entry_ID_Info_T         *Entry_ID,
          Qsy_Entry_Encr_Data_Info_T  *Encrypt_Data,
          Qsy_Entry_Data_Info_T       *Entry_Data,
          void                        *Attribute_Info);


  Service Program Name: QSYVLDL

  Default Public Authority: *USE

  Threadsafe: Yes

The QsyChangeValidationLstEntry() function changes an entry in a validation list object. The data to be encrypted, the entry data values, and some of the entry attributes may be changed.

To identify an entry to be changed, there must be an exact match in the entry for the value that is specified in the Entry_ID parameter and the length of the entry ID. For example, an entry ID value of "SMITH" with a length of 5 would not allow you to change an entry where the entry ID is "SMITH" and the length is 7.

Conversions are not done on any data when entries are changed. The CCSID values are stored as part of the record, to be available to the user of the API, but are not used when the entry is changed.


Authorities

Validation List Object
*USE and *UPD

Validation List Object Library
*EXECUTE

Parameters

Validation_Lst
(Input)

A pointer to the qualified object name of the validation list that contains the entry to change. The first 10 characters specify the validation list name, and the second 10 characters specify the library. You can use these special values for the library name:


Entry_ID
(Input)

A pointer to the entry ID information. The Qsy_Entry_ID_Info_T structure is as follows:




Encrypt_Data
(Input)

A pointer to the data that is associated with the entry ID. The data is encrypted by the system when it is stored. If the pointer is NULL, the encrypted data that is associated with the entry ID is not changed. The format of the Qsy_Entry_Encr_Data_Info_T structure is as follows:

If Encr_Data_Len is 0, any encrypted data that is associated with the entry ID will be removed.

Entry_Data
(Input)

A pointer to the data information that is associated with the entry ID. If the pointer is NULL, the data that is associated with the entry ID is not changed. The format of the Qsy_Entry_Data_Info_T structure is as follows:

If the Entry_Data_Length is 0, any data that is associated with the entry ID will be removed.

Attribute_Info
(Input)

A pointer to a structure that contains attribute information that is associated with the entry ID. If the pointer is NULL, the attributes associated with the entry ID are not changed. The format of the Qsy_Attr_Info_T structure is as follows:



The format of the Qsy_Attr_Descr_T structure is as follows:



The format of the Attr_Data_Info_T union is as follows:



The format of the Qsy_In_VLDL_T structure is as follows:

If the QSY_VFY_FIND value is specified for the QsyEncryptData attribute, the system value QRETSVRSEC (Retain server security data) is used to determine if the data to be encrypted is stored in the entry or not. If the system value is set to 0 (Do not retain data), the entry will be changed, but the data to be encrypted will not be stored with the entry. The return value from this function will be -2, to indicate that the entry was changed, but the data to be encrypted was not stored. If the system value is set to 1 (Retain data), then the data to be encrypted will be stored when the entry is changed.


Return Value


Error Conditions

If QsyChangeValidationLstEntry() is not successful, errno indicates one of the following errors.


Example

The following example changes an entry for a user named FRED in the validation list object WEBUSRS. FRED's encrypted data (password) and the CCSID for the encrypted data are being changed, but not any other data.

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.

#include <qsyvldl.h>

main()
{
  #define VLD_LST  "WEBUSRS   WEBLIB    "
  Qsy_Entry_ID_Info_T    entry_info;
  Qsy_Entry_Encr_Data_Info_T  encrypt_data;

  entry_info.Entry_ID_Len = 4;
  strncpy(entry_info.Entry_ID,"FRED",entry_info.Entry_ID_Len);
  encrypt_data.Encr_Data_Len = 7;
  encrypt_data.Encr_Data_CCSID = 37;
  strncpy(encrypt_data.Encr_Data,"MSN1TJG",
          encrypt_data.Encr_Data_Len);

  if (0 != QsyChangeValidationLstEntry(
                       (Qsy_Qual_Name_T *)&VLD_LST,
                       &entry_info,
                       &encrypt_data,
                       NULL,
                       NULL))
     perror("QsyChangeValidationLstEntry()");

}



API introduced: V4R1

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