476 lines
12 KiB
HTML
476 lines
12 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 Authority to an Object (QSYCUSRA) 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 -->
|
||
|
<!--File Edited by Kersten Dec 2001 -->
|
||
|
<!-- 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>Check User Authority to an Object (QSYCUSRA) API</h2>
|
||
|
|
||
|
<div class="box" style="width: 70%;">
|
||
|
<br>
|
||
|
Required Parameter Group:<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
<table width="100%">
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top" width="10%">1</td>
|
||
|
<td align="left" valign="top" width="50%">Authority 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">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">3</td>
|
||
|
<td align="left" valign="top">Qualified object name</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Char(20)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">4</td>
|
||
|
<td align="left" valign="top">Object type</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Char(10)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">5</td>
|
||
|
<td align="left" valign="top">Authority</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Char(*)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">6</td>
|
||
|
<td align="left" valign="top">Number of authorities</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Binary(4)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">7</td>
|
||
|
<td align="left" valign="top">Call level</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Binary(4)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">8</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>
|
||
|
|
||
|
<p>The Check User Authority to Object (QSYCUSRA) API provides an indication of
|
||
|
whether the user has the specified authority to an object.</p>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Authorities and Locks</h3>
|
||
|
|
||
|
<p>The following authority is required for the user calling this API, unless
|
||
|
the user profile name parameter is *CURRENT or the name of the profile that is
|
||
|
currently running, the caller owns the object, or the object is an
|
||
|
authorization list:</p>
|
||
|
|
||
|
<ul>
|
||
|
<li>*OBJMGT authority to the object.</li>
|
||
|
|
||
|
<li>*READ authority to the user profile.</li>
|
||
|
</ul>
|
||
|
|
||
|
<p>If the user profile is *CURRENT or the name of the profile that is running
|
||
|
currently, the authority to the user includes any authority specified on the
|
||
|
object (private, group, authorization list, or public) plus any program adopted
|
||
|
authority. If the user profile is not *CURRENT or the name of the profile that
|
||
|
is running currently, the authority available to the user is the authority
|
||
|
specified on the object.</p>
|
||
|
|
||
|
<p><strong>Adopted authority</strong> is authority given to the user by the
|
||
|
program for the duration of that program. If previous programs in the program
|
||
|
stack adopt their owner's authority, the adopted authority for the current
|
||
|
program is the accumulated adopted authority from all other programs in the
|
||
|
program stack that adopt authority.</p>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Required Parameter Group</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>Authority indicator</strong></dt>
|
||
|
|
||
|
<dd>OUTPUT; CHAR(1)
|
||
|
|
||
|
<p>Whether the user has the specified authority to the object. The field
|
||
|
contains one of the following:</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="5 95" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>Y</em></td>
|
||
|
<td align="left" valign="top">The user has the specified authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>N</em></td>
|
||
|
<td align="left" valign="top">The user does not have the specified
|
||
|
authority.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>User profile name</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(10)
|
||
|
|
||
|
<p>The name of the user whose authority is checked.</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">Checks the authority of the current user to the
|
||
|
specified object.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Qualified object name</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(20)
|
||
|
|
||
|
<p>The name of the object whose authority is checked. The first 10 characters
|
||
|
specify the object name; the second 10 characters specify the library. You can
|
||
|
use these special values for the library name:</p>
|
||
|
|
||
|
<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 object.
|
||
|
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
|
||
|
object.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Object type</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(10)
|
||
|
|
||
|
<p>The type of object whose authority is checked.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Authority</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(*)
|
||
|
|
||
|
<p>The authority to check for. This parameter can contain up to eleven
|
||
|
10-character fields. The following identifies the type of authority the user
|
||
|
has to the object:</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*EXCLUDE</em></td>
|
||
|
<td align="left" valign="top">Exclude authority. If this value is specified, no
|
||
|
other values can be specified.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*ALL</em></td>
|
||
|
<td align="left" valign="top">All authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*CHANGE</em></td>
|
||
|
<td align="left" valign="top">Change authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*USE</em></td>
|
||
|
<td align="left" valign="top">Use authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*AUTLMGT</em></td>
|
||
|
<td align="left" valign="top">Authorization list management authority. This
|
||
|
value is only valid if the object type is *AUTL.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*OBJALTER</em></td>
|
||
|
<td align="left" valign="top">Object alter authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*OBJOPR</em></td>
|
||
|
<td align="left" valign="top">Object operational authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*OBJMGT</em></td>
|
||
|
<td align="left" valign="top">Object management authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*OBJEXIST</em></td>
|
||
|
<td align="left" valign="top">Object existence authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*OBJREF</em></td>
|
||
|
<td align="left" valign="top">Object reference authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*READ</em></td>
|
||
|
<td align="left" valign="top">Read authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*ADD</em></td>
|
||
|
<td align="left" valign="top">Add authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*UPD</em></td>
|
||
|
<td align="left" valign="top">Update authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*DLT</em></td>
|
||
|
<td align="left" valign="top">Delete authority.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">*EXECUTE</td>
|
||
|
<td align="left" valign="top">Execute authority.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Number of authorities</strong></dt>
|
||
|
|
||
|
<dd>INPUT; BINARY(4)
|
||
|
|
||
|
<p>The number of authorities specified in the authority parameter. You can
|
||
|
specify 1 through 11 authorities.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Call level</strong></dt>
|
||
|
|
||
|
<dd>INPUT; BINARY(4)
|
||
|
|
||
|
<p>The number of call levels to back up in the program stack to do the
|
||
|
authority check. For example, if the program that calls this API adopts
|
||
|
authority, you would probably not want the authority check to use the adopted
|
||
|
authority. Therefore, the authority check should be done at the call level
|
||
|
previous to the current level. This parameter should then contain a 1. You can
|
||
|
check the authority at the various call levels by signifying a numeric
|
||
|
equivalent to the call level. For example, to check the authority at the
|
||
|
current call level, specify a 0; to check the authority at the previous call
|
||
|
level, specify a 1.</p>
|
||
|
|
||
|
<p>This parameter is only used if the user profile name parameter is *CURRENT
|
||
|
or the current user for the job.</p>
|
||
|
</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">CPF22FA E</td>
|
||
|
<td width="85%" valign="top">Authority value &1 not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF22FB E</td>
|
||
|
<td align="left" valign="top">Must specify *EXCLUDE or *AUTL as only authority
|
||
|
value.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF22F7 E</td>
|
||
|
<td align="left" valign="top">Number of authorities must be between 1 and
|
||
|
&1.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF22F9 E</td>
|
||
|
<td align="left" valign="top">Call level &1 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">CPF3CF1 E</td>
|
||
|
<td align="left" valign="top">Error code parameter not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF3C31 E</td>
|
||
|
<td align="left" valign="top">Object type &1 is not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF8122 E</td>
|
||
|
<td align="left" valign="top">&8 damage on library &4.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9801 E</td>
|
||
|
<td align="left" valign="top">Object &2 in library &3 not found.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9802 E</td>
|
||
|
<td align="left" valign="top">Not authorized to object &2 in &3.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9803 E</td>
|
||
|
<td align="left" valign="top">Cannot allocate object &2 in library
|
||
|
&3.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9807 E</td>
|
||
|
<td align="left" valign="top">One or more libraries in library list
|
||
|
deleted.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9808 E</td>
|
||
|
<td align="left" valign="top">Cannot allocate one or more libraries on library
|
||
|
list.</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">CPF9811 E</td>
|
||
|
<td align="left" valign="top">Program &1 in library &2 not found.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9812 E</td>
|
||
|
<td align="left" valign="top">File &1 in library &2 not found.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9814 E</td>
|
||
|
<td align="left" valign="top">Device &1 not found.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9820 E</td>
|
||
|
<td align="left" valign="top">Not authorized to use library &1.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9830 E</td>
|
||
|
<td align="left" valign="top">Cannot assign library &1.</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: V2R2
|
||
|
|
||
|
<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>
|
||
|
|