QsyFindNextValidationLstEntry()--Find Next Validation List Entry API



  Syntax
 #include <qsyvldl.h>

 int QsyFindNextValidationLstEntry
       (Qsy_Qual_Name_T        *Validation_Lst,
        Qsy_Entry_ID_Info_T    *Entry_ID,
        Qsy_Rtn_Vld_Lst_Ent_T  *Next_Entry);


  Service Program Name: QSYVLDL

  Default Public Authority: *USE

  Threadsafe: Yes

The QsyFindNextValidationLstEntry() function finds the next entry in a validation list object after the entry that is passed in the Entry_ID parameter. It then returns the information for the next entry in the buffer that is pointed to by the Next_Entry parameter. The entries are stored in hexadecimal sort sequence; therefore, the next entry will be the one with an entry ID whose hexadecimal value would follow the hexadecimal value of the entry passed in the Entry_ID parameter. The entry specified in the Entry_ID parameter does not need to exist in the validation list, and this function does not have to follow a QsyFindFirstValidationLstEntry() or QsyFindValidationLstEntry() function call.

Authorities

Validation List Object
*USE

Validation List Object Library
*EXECUTE

Note: If the QsyEncryptData attribute is set to QSY_VFY_FIND_E (1), then the user must have *USE, *ADD, and *UPD authority to the validation list to get the data to be encrypted returned in the Next_Entry parameter.


Parameters

Validation_Lst
(Input)

A pointer to the qualified object name of the validation list to find the next entry in. 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 format of the Qsy_Entry_ID_Info_T structure is as follows:



Next_Entry
(Output)

A pointer to the buffer where the next entry information is placed. The buffer must be allocated to the size of the Qsy_Rtn_Vld_Lst_Ent_T structure or the results will be unpredictable. The format of the Qsy_Rtn_Vld_Lst_Ent_T structure is as follows:

See the Entry_ID parameter for the format of the Qsy_Entry_ID_Info_T structure.

The format of the Qsy_Entry_Encr_Data_Info_T structure is as follows:

The format of the Qsy_Entry_Data_Info_T structure is as follows:


Return Value



Error Conditions

If QsyFindNextValidationLstEntry() is not successful, errno indicates one of the following errors:



Example

The following example finds all the entries in the validation list object WEBUSRS.

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

#include <qsyvldl.h>
#include <errno.h>

main()
{
  #define VLD_LST  "WEBUSRS   WEBLIB    "
  Qsy_Rtn_Vld_Lst_Ent_T  entry_1;
  Qsy_Rtn_Vld_Lst_Ent_T  entry_2;
  Qsy_Rtn_Vld_Lst_Ent_T  *input_info,
                         *output_info,
                         *temp;
  Qsy_Entry_ID_Info_T    *input_entry;
  short int              i;
  int                    rtn_errno;

  /* Initialize pointers to input and output buffers.               */
  output_info = addr(entry_1);
  input_info = addr(entry_2);
  /* Get the first entry in the validation list.                    */
  rtn_errno = QsyFindFirstValidationLstEntry(
                            (Qsy_Qual_Name_T *)&VLD_LST,
                             output_info))

  while (0 == rtn_errno)
  { /* Process all the entries in the validation list.              */
          .
          .
          .
     (process the entry)
          .
          .
          .
    /* Switch the pointers to the buffers so that the output from   */
    /* the last find operation is used as input to the 'find-next'
    /* operation.                                                   */
    temp = output_info;
    output_info = input_info;
    input_info = temp;

    /* Find the next entry.                                         */
    rtn_errno = QsyFindNextValidationLstEntry(
                             (Qsy_Qual_Name_T *)&VLD_LST,
                             &(input_info->Entry_ID_Info),
                             output_info))
  }
  /* Check if an error occurred.                                    */
  if (0 != rtn_errno && ENOREC != errno)
    perror("Find of validation list entry");

}


API introduced: V4R1

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