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

95 lines
4.9 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="cwbRC_AddParm" />
<meta name="DC.Relation" scheme="URI" content="rzaikrcdpcapilist3.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="cwbrc_addparm" />
<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>cwbRC_AddParm</title>
</head>
<body id="cwbrc_addparm"><a name="cwbrc_addparm"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1"><span class="apiname">cwbRC_AddParm</span></h1>
<div><div class="section"><h4 class="sectiontitle">Purpose</h4><p>Add a parameter to the program that is identified
by the handle. This function should be called once for each parameter that
is to be added to the program. When the program is called the parameters will
be in the same order that they are added using this function.</p>
</div>
<div class="section"><h4 class="sectiontitle">Syntax</h4><pre>unsigned int CWB_ENTRY cwbRC_AddParm(
cwbRC_PgmHandle program,
unsigned short type,
unsigned long length,
const unsigned char *parameter);</pre>
</div>
<div class="section"><h4 class="sectiontitle">Parameters</h4><dl><dt class="dlterm">cwbRC_PgmHandle program - input</dt>
<dd>Handle that was returned by a previous call to the <span class="apiname">cwbRC_CreatePgm</span> API.
It identifies the program object.</dd>
<dt class="dlterm">unsigned short type - input</dt>
<dd>The type of parameter this is. Use one of the defined parameter types:
CWBRC_INPUT, CWBRC_OUTPUT, CWBRC_INOUT. If you want to automatically convert
between local CCSID and host CCSID, add the appropriate convert flag to this
field with a bitwise, or use one of the defined parameter types: <ul><li>CWBRC_TEXT_CONVERT</li>
<li>CWBRC_TEXT_CONVERT_INPUT</li>
<li>CWBRC_TEXT_CONVERT_OUTPUT</li>
</ul>
The last two types are intended for use with CWBRC_INOUT when conversion
is only needed in one direction.</dd>
<dt class="dlterm">unsigned long length - input</dt>
<dd>The length of the parameter. If this is an CWBRC_OUTPUT parameter, the
length should be the length of the buffer where the returned parameter
will be written.</dd>
<dt class="dlterm">const unsigned char * parameter - input</dt>
<dd>Pointer to a buffer that will contain: the value if the type is CWBRC_INPUT
or CWBRC_INOUT, or the place where the returned parameter is to be written
if the type is CWBRC_OUTPUT or CWBRC_INOUT.</dd>
</dl>
</div>
<div class="section"><h4 class="sectiontitle">Return Codes</h4><p>The following list shows common return
values:</p>
<dl><dt class="dlterm">CWB_OK</dt>
<dd>Successful completion.</dd>
<dt class="dlterm">CWBRC_INVALID_PROGRAM</dt>
<dd>Invalid program handle.</dd>
<dt class="dlterm">CWBRC_INVALID_TYPE</dt>
<dd>Invalid type specified.</dd>
<dt class="dlterm">CWBRC_INVALID_PARM_LENGTH</dt>
<dd>Invalid parameter length.</dd>
<dt class="dlterm">CWBRC_INVALID_PARM</dt>
<dd>Invalid parameter.</dd>
</dl>
</div>
<div class="section"><h4 class="sectiontitle">Usage</h4><p>Parameter data is assumed to be binary. No
conversion will be performed on the parameter data unless one of the conversion
flags is set. For example: </p>
<pre>cwbRC_AddParm( hPgm,
CWBRC_INOUT | CWBRC_TEXT_CONVERT_OUTPUT,
bufferSize,
buffer ); </pre>
<p>will use the buffer as is to send to the host,
and will convert the output (eg to ASCII) before putting the result into the
buffer.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaikrcdpcapilist3.htm" title="Use these APIs to access programs and their parameters.">Remote Command/Distributed Program Call: Access programs APIs list for iSeries Access for Windows</a></div>
</div>
</div>
</body>
</html>