ibm-information-center/dist/eclipse/plugins/i5OS.ic.ddp_5.4.0.1/rbal1sacep.htm

108 lines
6.7 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Example: DRDA server access control exit program" />
<meta name="abstract" content="This exit program shows an example of a PL/I exit program that allows all DRDA operations and all DRDA connections except when the user ID is ALIEN." />
<meta name="description" content="This exit program shows an example of a PL/I exit program that allows all DRDA operations and all DRDA connections except when the user ID is ALIEN." />
<meta name="DC.subject" content="user exit program, example" />
<meta name="keywords" content="user exit program, example" />
<meta name="DC.Relation" scheme="URI" content="rbal1exitpgms.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal1sacep" />
<meta name="DC.Language" content="en-us" />
<!-- 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. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Example: DRDA server
access control exit program</title>
</head>
<body id="rbal1sacep"><a name="rbal1sacep"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: DRDA server
access control exit program</h1>
<div><p>This exit program shows an example of a PL/I exit program that
allows all DRDA<sup>®</sup> operations
and all DRDA connections
except when the user ID is ALIEN.</p>
<div class="section"><div class="note"><span class="notetitle">Note:</span> By using the code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div>
<div class="fignone" id="rbal1sacep__rbal1exitpgmxmp"><a name="rbal1sacep__rbal1exitpgmxmp"><!-- --></a><span class="figcap">Figure 1. Example
PL/I user exit program</span><pre>/**********************************************************************/
/* */
/* PROGRAM NAME: UEPALIEN */
/* */
/* FUNCTION: USER EXIT PROGRAM THAT IS DESIGNED TO */
/* RETURN AN UNSUCCESSFUL RETURN CODE WHEN */
/* USERID 'ALIEN' ATTEMPTS A DRDA CONNECTION. */
/* IT ALLOWS ALL TYPES OF DDM OPERATIONS. */
/* */
/* EXECUTION: CALLED WHEN ESTABLISHED AS THE USER EXIT */
/* PROGRAM. */
/* */
/* ALL PARAMETER VARIABLES ARE PASSED IN EXCEPT: */
/* */
/* RTNCODE - USER EXIT RETURN CODE ON WHETHER FUNCTION IS */
/* ALLOWED: '1' INDICATES SUCCESS; '0' FAILURE. */
/* */
/**********************************************************************/
UEPALIEN: PROCEDURE (RTNCODE,CHARFLD);
DECLARE RTNCODE CHAR(1); /* DECLARATION OF THE EXIT */
/* PROGRAM RETURN CODE. IT */
/* INFORMS REQUEST HANDLER */
/* WHETHER REQUEST IS ALLOWED. */
DECLARE /* DECLARATION OF THE CHAR */
1 CHARFLD, /* FIELD PASSED IN ON THE CALL. */
2 USER CHAR(10), /* USER PROFILE OF DDM/DRDA USER */
2 APP CHAR(10), /* APPLICATION NAME */
2 FUNC CHAR(10), /* REQUESTED FUNCTION */
2 OBJECT CHAR(10), /* FILE NAME */
2 DIRECT CHAR(10), /* LIBRARY NAME */
2 MEMBER CHAR(10), /* MEMBER NAME */
2 RESERVED CHAR(10), /* RESERVED FIELD */
2 LNGTH PIC '99999', /* LENGTH OF USED SPACE IN REST */
2 REST, /* REST OF SPACE = CHAR(2000) */
3 LUNAME CHAR(10), /* REMOTE LU NAME (IF SNA) */
3 SRVNAME CHAR(10), /* REMOTE SERVER NAME */
3 TYPDEFN CHAR(9), /* TYPE DEF NAME OF DRDA AR */
3 PRDID, /* PRODUCT ID OF DRDA AR */
5 PRODUCT CHAR(3), /* PRODUCT CODE */
5 VERSION CHAR(2), /* VERSION ID */
5 RELEASE CHAR(2), /* RELEASE ID */
5 MOD CHAR(1), /* MODIFICATION LEVEL */
5 RDBNAME CHAR(18), /* RDB NAME */
5 REMAING CHAR(1965), /* REMAINING VARIABLE SPACE */
START:
IF (USER = 'ALIEN' &amp; /* IF USER IS 'ALIEN' AND */
FUNC = 'SQLCNN') THEN /* FUNCTION IS DRDA CONNECT */
RTNCODE = '0'; /* SET RETURN CODE TO UNSUCCESSFUL */
ELSE /* IF ANY OTHER USER, OR DDM */
RTNCODE = '1'; /* SET RETURN CODE TO SUCCESSFUL */
END UEPALIEN;</pre>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal1exitpgms.htm" title="A security feature of the Distributed Relational Database Architecture (DRDA) server, for use with both Advanced Program-to-Program Communication (APPC) and TCP/IP, extends the use of the DDMACC parameter of the Change Network Attributes (CHGNETA) command to DRDA.">DRDA server access control exit programs</a></div>
</div>
</div>
</body>
</html>