ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaik_5.4.0.1/userexitex3.htm

94 lines
5.8 KiB
HTML
Raw 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: CL user exit program for exit point QIBM_QZDA_INIT" />
<meta name="abstract" content="The following Control Language program handles ODBC security by rejecting requests from certain users. It can be used as a shell for developing exit programs tailored for your operating environment." />
<meta name="description" content="The following Control Language program handles ODBC security by rejecting requests from certain users. It can be used as a shell for developing exit programs tailored for your operating environment." />
<meta name="DC.Relation" scheme="URI" content="rzaiksampluserextpgm.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="userexitex3" />
<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: CL user exit program for exit point QIBM_QZDA_INIT</title>
</head>
<body id="userexitex3"><a name="userexitex3"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: CL user exit program for exit point QIBM_QZDA_INIT</h1>
<div><p>The following Control Language program handles ODBC security by
rejecting requests from certain users. It can be used as a shell for developing
exit programs tailored for your operating environment.</p>
<div class="example"> <pre>/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* @@ss1s@@ Servers - Sample Exit Program */
/* */
/* Exit Point Name : QIBM_QZDA_INIT */
/* */
/* Description : The following Control Language program */
/* handles ODBC security by rejecting */
/* requests from certain users. */
/* It can be used as a shell for developing */
/* exit programs tailored for your */
/* operating environment. */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
PGM PARM(&amp;STATUS &amp;REQUEST)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Program call parameter declarations */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
DCL VAR(&amp;STATUS) TYPE(*CHAR) LEN(1) /* Accept/Reject indicator */
DCL VAR(&amp;REQUEST) TYPE(*CHAR) LEN(34) /* Parameter structure */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Parameter declares */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
DCL VAR(&amp;USER) TYPE(*CHAR) LEN(10) /* User profile name calling server*/
DCL VAR(&amp;SRVID) TYPE(*CHAR) LEN(10) /* database server value (*SQL) */
DCL VAR(&amp;FORMAT) TYPE(*CHAR) LEN(8) /* Format name (ZDAI0100) */
DCL VAR(&amp;FUNC) TYPE(*CHAR) LEN(4) /* function being preformed (0) */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Extract the various parameters from the structure */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CHGVAR VAR(&amp;USER) VALUE(%SST(&amp;REQUEST 1 10))
CHGVAR VAR(&amp;SRVID) VALUE(%SST(&amp;REQUEST 11 10))
CHGVAR VAR(&amp;FORMAT) VALUE(%SST(&amp;REQUEST 21 8))
CHGVAR VAR(&amp;FUNC) VALUE(%SST(&amp;REQUEST 28 4))
/*------------------------------------------------------------------------
------------------------------------------------------------------------*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Begin main program */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* set return code to allow the request. */
CHGVAR VAR(&amp;STATUS) VALUE('1')
/* if user name is GUEST set return code to reject the request. */
IF (&amp;USER *EQ 'GUEST') THEN( +
CHGVAR VAR(&amp;STATUS) VALUE('0') )
EXIT:
ENDPGM</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaiksampluserextpgm.htm" title="The following examples do not show all of the programming considerations or techniques. Review the examples before you begin application design and coding.">Examples: User exit programs</a></div>
</div>
</div>
</body>
</html>