ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/QSYVFVLE.htm

329 lines
9.2 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>QsyVerifyValidationLstEntry()--Verify Validation List Entry API</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Sec SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<h2>QsyVerifyValidationLstEntry()--Verify Validation List Entry API</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Syntax<br>
<pre>
#include &lt;qsyvldl.h&gt;
int QsyVerifyValidationLstEntry
(Qsy_Qual_Name_T *<em>Validation_Lst</em>,
Qsy_Entry_ID_Info_T *<em>Entry_ID</em>,
Qsy_Entry_Encr_Data_Info_T *<em>Encrypt_Data</em>);
</pre>
&nbsp;&nbsp;Service Program Name: Name QSYVLDL<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The <strong>QsyVerifyValidationLstEntry()</strong> function verifies an
entry in a validation list object. It verifies the entry by finding the
validation list object, then finding the entry that is specified in the
<em>Entry_ID</em> parameter. To find an entry, there must be an exact match in
the entry for the value that is specified in the <em>Entry_ID</em> parameter
and the length of the entry ID. For example, an entry ID value of "SMITH" with
a length of 5 would not find an entry where the entry ID is "SMITH " and the
length is 7.</p>
<p>If the entry is found, the data specified in the <em>Encrypt_Data</em>
parameter is encrypted by the system and compared to the encrypted data that is
stored for the entry. If the encrypted data fields do not match, then -2 is
returned by the function.</p>
<p>The verification of an entry should be done within the same process as the
work that is being done on behalf of this entry ID so that there is
accountability for the actions that are taken. Also, an entry ID should be
verified just before the work is done on behalf of that entry ID, instead of
verifying a set of entry IDs and then doing work on behalf of the different
entry IDs.<br>
</p>
<h3>Authorities</h3>
<dl>
<dt><em>Validation List Object</em></dt>
<dd>*USE</dd>
<dt><em>Validation List Object Library</em></dt>
<dd>*EXECUTE</dd>
</dl>
<br>
<h3>Parameters</h3>
<dl>
<dt><strong>Validation_Lst</strong></dt>
<dd>(Input) A pointer to the qualified object name of the validation list that
contains the entry to verify. 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:
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*CURLIB</em></td>
<td align="left" valign="top">The current library is used to locate the
validation list. If there is no current library, QGPL (general purpose library)
is used.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*LIBL</em></td>
<td align="left" valign="top">The library list is used to locate the validation
list.</td>
</tr>
</table>
<br>
<br>
</dd>
<dt><strong>Entry_ID</strong></dt>
<dd>(Input)
<p>A pointer to the entry ID information. The format of the Qsy_Entry_ID_Info_T
structure is as follows:</p>
<table cellpadding="5" border>
<!-- cols="15 20 65" -->
<tr>
<td align="LEFT" valign="TOP">int</td>
<td align="LEFT" valign="TOP">Entry_ID_Len</td>
<td align="LEFT" valign="TOP">The number of bytes of data that is provided as
the entry ID. Possible values are from 1 through 100.</td>
</tr>
<tr>
<td align="LEFT" valign="TOP">unsigned int</td>
<td align="LEFT" valign="TOP">Entry_ID_CCSID</td>
<td align="LEFT" valign="TOP">An integer that represents the CCSID for the
entry ID. Valid CCSID values are in the range 1 through 65535. This field is
not used to verify the entry.</td>
</tr>
<tr>
<td align="LEFT" valign="TOP">unsigned char</td>
<td align="LEFT" valign="TOP">Entry_ID[100]</td>
<td align="LEFT" valign="TOP">The data that is used to identify this entry in
the validation list.</td>
</tr>
</table>
<br>
<br>
</dd>
<dt><strong>Encrypt_Data</strong></dt>
<dd>(Input)
<p>A pointer to the encrypted data information that is associated with the
entry ID. The format of the Qsy_Entry_Encr_Data_Info_T structure is as
follows:</p>
<table border cellpadding="5">
<!-- cols="15 20 65" -->
<tr>
<td align="LEFT" valign="TOP">int</td>
<td align="LEFT" valign="TOP">Encr_Data_Len</td>
<td align="LEFT" valign="TOP">The number of bytes of data to be encrypted and
compared to the encrypted data in the validation list entry. Possible values
are 1 through 600.</td>
</tr>
<tr>
<td align="LEFT" valign="TOP">unsigned int</td>
<td align="LEFT" valign="TOP">Encr_Data_CCSID</td>
<td align="LEFT" valign="TOP">An integer that represents the CCSID for the data
to encrypt. Valid CCSID values are in the range 0 through 65535. This value is
not used to verify the entry.</td>
</tr>
<tr>
<td align="LEFT" valign="TOP">unsigned char</td>
<td align="LEFT" valign="TOP">Encr_Data[600]</td>
<td align="LEFT" valign="TOP">The data to be encrypted and compared to the
encrypted data that is found for the specified entry ID in the validation
list.</td>
</tr>
</table>
</dd>
</dl>
<br>
<br>
<h3>Return Value</h3>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left" valign="top">QsyVerifyValidationLstEntry() was
successful.</td>
</tr>
<tr>
<td align="left" valign="top"><em>-1</em></td>
<td align="left" valign="top">QsyVerifyValidationLstEntry() was not successful.
<p>The <em>errno</em> global variable is set to indicate the error.</p>
</td>
</tr>
<tr>
<td align="left" valign="top" nowrap><em>-2</em></td>
<td align="left" valign="top">QsyVerifyValidationLstEntry() was not successful
because the encrypted data was incorrect.</td>
</tr>
</table>
<br>
<h3>Error Conditions</h3>
<p>If <strong>QsyVerifyValidationLstEntry()</strong> is not successful,
<em>errno</em> indicates one of the following errors:</p>
<table cellpadding="5">
<!-- cols="10 90" -->
<tr>
<td align="left" valign="top"><em>3401</em></td>
<td align="left" valign="top">[EACCES]
<p>The current user does not have *USE authority to the validation list object,
or does not have *EXECUTE authority to the validation list object library.</p>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>3406</em></td>
<td align="left" valign="top">[EAGAIN]
<p>The validation list object is currently locked by another process.</p>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>3484</em></td>
<td align="left" valign="top">[EDAMAGE]
<p>The validation list object is damaged.</p>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>3021</em></td>
<td align="left" valign="top">[EINVAL]
<p>Parameter value is not valid.</p>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>3025</em></td>
<td align="left" valign="top">[ENOENT]
<p>The validation list object was not found.</p>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>3026</em></td>
<td align="left" valign="top">[ENOREC]
<p>Specified entry does not exist.</p>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>3474</em></td>
<td align="left" valign="top">[EUNKNOWN]
<p>Unknown system state. Check the job log for a CPF9872 message.</p>
</td>
</tr>
</table>
<br>
<br>
<h3>Example</h3>
<p>See <a href="../apiref/aboutapis.htm#codedisclaimer">Code disclaimer information</a>
for information pertaining to code examples.</p>
<p>The following example validates the entry for a user named FRED in the
validation list object WEBUSRS.</p>
<pre>
#include &lt;qsyvldl.h&gt;
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;
strncpy(encrypt_data.Encr_Data,"MSN1TJG",
encrypt_data.Encr_Data_Len);
if (0 != QsyVerifyValidationLstEntry((Qsy_Qual_Name_T *)&amp;VLD_LST,
&amp;entry_info,
&amp;encrypt_data))
perror("QsyVerifyValidationLstEntry()");
}
</pre>
<br>
<hr>
API introduced: V4R1
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"sec.htm">Security APIs</a> | <a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
</body>
</html>