329 lines
8.5 KiB
HTML
329 lines
8.5 KiB
HTML
<!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>Check User Function Usage (QSYCKUFU, QsyCheckUserFunctionUsage)
|
|
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 -->
|
|
<!-- Edited by Kersten Jan 02 -->
|
|
<!--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 language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
|
</script>
|
|
|
|
<h2>Check User Function Usage (QSYCKUFU, QsyCheckUserFunctionUsage) API</h2>
|
|
|
|
|
|
<div class="box" style="width: 60%;">
|
|
<br>
|
|
<img src="delta.gif" alt="Start of change">Required Parameter Group for QSYCKUFU:<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
<table width="100%">
|
|
|
|
<tr>
|
|
<td align="center" valign="top" width="10%">1</td>
|
|
<td align="left" valign="top" width="50%">Usage indicator</td>
|
|
<td align="left" valign="top" width="20%">Output</td>
|
|
<td align="left" valign="top" width="20%">Char(1)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">2</td>
|
|
<td align="left" valign="top">Function ID</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(30)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">3</td>
|
|
<td align="left" valign="top">User profile name</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(10)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">4</td>
|
|
<td align="left" valign="top">Error code</td>
|
|
<td align="left" valign="top">I/O</td>
|
|
<td align="left" valign="top">Char(*)</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Yes<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<div class="box" style="width: 60%;">
|
|
<br>
|
|
Syntax for QsyCheckUserFunctionUsage:<br>
|
|
<pre>
|
|
#include <qsyfnusg.h>
|
|
|
|
void QsyCheckUserFunctionUsage
|
|
(char *<em>Usage_indicator</em>,
|
|
char <em>Function_ID</em>[30],
|
|
char <em>User_profile_name</em>[10],
|
|
void *<em>Error_code</em>);
|
|
|
|
</pre>
|
|
Service Program: QSYFNUSG<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Yes<img src="deltaend.gif" alt="End of change"><br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
|
|
<p>The Check User Function Usage (OPM, QSYCKUFU; ILE,
|
|
QsyCheckUserFunctionUsage) API checks to see if a user is allowed to use the
|
|
specified function, and returns an indication of whether the user is allowed to
|
|
use the function. When the check is made, the usage setting for the user, its
|
|
group, the default usage value, and the allow *ALLOBJ indicator for the
|
|
function are taken into account. Following are the steps the system takes to
|
|
determine the usage indicator for the user to the function:</p>
|
|
|
|
<ol>
|
|
<li>Is the *ALLOBJ indicator for the function set to 1 and does the user have
|
|
*ALLOBJ special authority? If yes to both, set the returned usage indicator to
|
|
usage allowed and return. Otherwise, continue with step 2.</li>
|
|
|
|
<li>Does the user have a usage setting for the function? If yes, set the
|
|
returned usage indicator to the usage indicator for the user and return.
|
|
Otherwise, continue with step 3.</li>
|
|
|
|
<li>Does the user have any groups? If yes, continue with step 3a. Otherwise, go
|
|
to step 4.
|
|
|
|
<ol>
|
|
<li>Repeat the following steps for each group:
|
|
|
|
<ol>
|
|
<li>Is the *ALLOBJ indicator for the function set to 1 and does the group have
|
|
*ALLOBJ special authority? If yes to both, set the returned usage indicator to
|
|
usage allowed and return. Otherwise, go to step 3a2.</li>
|
|
|
|
<li>Does the group have a usage setting for the function? If yes, go to step
|
|
3a2a. Otherwise, go look at the next group, starting over with step 3a1.
|
|
|
|
<ol>
|
|
<li>Does the group's usage setting allow usage of the function? If yes, set the
|
|
returned usage indicator to usage allowed and return. Otherwise, set a flag
|
|
that indicates a group usage setting is found and go look at the next group,
|
|
starting over with step 3a1.</li>
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
|
|
<li>Is the group usage setting found flag set on? If yes, set the returned
|
|
usage indicator to usage not allowed and return. Otherwise, continue with step
|
|
4.</li>
|
|
</ol>
|
|
</li>
|
|
|
|
<li>Set the returned usage indicator to the default usage value and
|
|
return.</li>
|
|
</ol>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<dl>
|
|
<dt><em>API Public Authority</em></dt>
|
|
|
|
<dd>*USE</dd>
|
|
|
|
<dt><em>Function Registration Lock</em></dt>
|
|
|
|
<dd>*SHRNUP</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Required Parameter Group</h3>
|
|
|
|
<dl>
|
|
<dt><strong>Usage indicator</strong></dt>
|
|
|
|
<dd>OUTPUT; CHAR(1)
|
|
|
|
<p>Whether the user is allowed to use the specified function.<br>
|
|
This parameter contains one of the following values:</p>
|
|
|
|
<table cellpadding="5">
|
|
<!-- cols="5 95" -->
|
|
<tr>
|
|
<td align="left" valign="top"><em>1</em></td>
|
|
<td align="left" valign="top">The user is not allowed to use the specified
|
|
function.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>2</em></td>
|
|
<td align="left" valign="top">The user is allowed to use the specified
|
|
function.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>Function ID</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(30)
|
|
|
|
<p>The ID of the function to check usage information for.</p>
|
|
</dd>
|
|
|
|
<dt><strong>User profile name</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(10)
|
|
|
|
<p>The name of the user to check for usage to the specified function.</p>
|
|
|
|
<p>You can specify the following special value:</p>
|
|
|
|
<table cellpadding="5">
|
|
<!-- cols="15 85" -->
|
|
<tr>
|
|
<td align="left" valign="top"><em>*CURRENT</em></td>
|
|
<td align="left" valign="top">The usage check is made for the user currently
|
|
running.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>Error code</strong></dt>
|
|
|
|
<dd>I/O; CHAR(*)
|
|
|
|
<p>The structure in which to return error information. For the format of the
|
|
structure, see <a href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Error Messages</h3>
|
|
|
|
<table width="100%">
|
|
<tr>
|
|
<th align="left" valign="top">Message ID</th>
|
|
<th align="left" valign="top">Error Message Text</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td width="15%" valign="top">CPF2204 E</td>
|
|
<td width="85%" valign="top">User profile &1 not found.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF2225 E</td>
|
|
<td align="left" valign="top">Not able to allocate internal system object.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF228A E</td>
|
|
<td align="left" valign="top">Function &1 not registered.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3C36 E</td>
|
|
<td align="left" valign="top">Number of parameters, &1, entered for this
|
|
API was not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3C90 E</td>
|
|
<td align="left" valign="top">Literal value cannot be changed.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3CD9 E</td>
|
|
<td align="left" valign="top">Requested function cannot be performed at this
|
|
time.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3CDA E</td>
|
|
<td align="left" valign="top">Registration facility repository not available
|
|
for use.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3CF1 E</td>
|
|
<td align="left" valign="top">Error code parameter not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3CF2 E</td>
|
|
<td align="left" valign="top">Error(s) occurred during running of &1
|
|
API.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF8100 E</td>
|
|
<td align="left" valign="top">All CPF81xx messages could be returned. xx is
|
|
from 01 to FF.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF9810 E</td>
|
|
<td align="left" valign="top">Library &1 not found.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF9872 E</td>
|
|
<td align="left" valign="top">Program or service program &1 in library
|
|
&2 ended. Reason code &3.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<hr>
|
|
API introduced: V4R3
|
|
|
|
<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>
|
|
|