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

102 lines
6.8 KiB
HTML

<?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="Typical use of iSeries Access for Windows Remote Command/Distributed Program Call APIs" />
<meta name="abstract" content="An application that uses the iSeries Access for Windows Remote Command/Distributed Program Call function uses objects." />
<meta name="description" content="An application that uses the iSeries Access for Windows Remote Command/Distributed Program Call function uses objects." />
<meta name="DC.Relation" scheme="URI" content="rzaikapprc.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="rcdpctypuse" />
<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>Typical use of iSeries Access for Windows Remote
Command/Distributed Program Call APIs</title>
</head>
<body id="rcdpctypuse"><a name="rcdpctypuse"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Typical use of <span class="keyword">iSeries Access for Windows</span> Remote
Command/Distributed Program Call APIs</h1>
<div><p>An application that uses the <span class="keyword">iSeries™ Access for Windows<sup>®</sup></span> Remote
Command/Distributed Program Call function uses objects.</p>
<div class="section"><p>Each of these objects are identified to the application through
a handle: </p>
<dl><dt class="dlterm">System object</dt>
<dd>This represents an iSeries system. The handle to the system object is
provided to the StartSysEx function to identify the system on which the commands
or APIs will be run.</dd>
<dt class="dlterm">Command request object</dt>
<dd>This represents the request to the iSeries system. Commands can be run and
programs can be called on this object. <div class="note"><span class="notetitle">Note:</span> The Command Request object previously
was known as the "system object" in <span class="keyword">iSeries Access for Windows</span>.</div>
</dd>
<dt class="dlterm">Program object</dt>
<dd>This represents the iSeries program. Parameters can be added, and the
program can be sent to the system to run the program.</dd>
</dl>
</div>
<div class="section"><p>There is not a separate object for commands. The command string
is sent directly to the command request.</p>
</div>
<div class="section"><div class="p">An application that uses the Remote Command/Distributed Program
Call APIs first creates a system object by calling the <a href="rzaikcwbcocreatesystem.htm#cwbco_createsystem">cwbCO_CreateSystem</a> function.
This function returns a handle to the system object. This handle then is used
with the <a href="rzaikcwbrcstartsysex.htm#cwbrc_startsysex">cwbRC_StartSysEx</a> function
to start a conversation with the iSeries system. The <span class="apiname">cwbRC_StartSysEx</span> function
returns a handle to the command request. Use the command request handle to
call programs or to run commands. The APIs that are associated with the command
request object are: <ul><li><a href="rzaikcwbrcstartsysex.htm#cwbrc_startsysex">cwbRC_StartSysEx</a></li>
<li><a href="rzaikcwbrccallpgm.htm#cwbrc_callpgm">cwbRC_CallPgm</a></li>
<li><a href="rzaikcwbrcruncmd.htm#cwbrc_runcmd">cwbRC_RunCmd</a></li>
<li><a href="rzaikcwbrcstopsys.htm#cwbrc_stopsys">cwbRC_StopSys</a></li>
</ul>
</div>
</div>
<div class="section"><p>A command is a character string that is to be run on the iSeries system.
Because it is a simple object (a character string) no additional object will
need to be created in order to run a command. The command string simply is
a parameter on the <span class="apiname">cwbRC_RunCmd</span> API.</p>
</div>
<div class="section"><p>A program is a complex object that is created with the <span class="apiname">cwbRC_CreatePgm</span> API,
which requires the program name and the library name as parameters. The handle
that is returned by this function can have 0 to 35 parameters associated with
it. Parameters are added with the <span class="apiname">cwbRC_AddParm</span> function.
Parameters types can be input, output, or input/output. These parameters need
to be in a format with which the iSeries program can work (that is, one
for which no data transform or data conversion will occur). When all of the
parameters have been added, the program handle is used with the <span class="apiname">cwbRC_CallPgm</span> API
on the command request object. The APIs that are associated with the program
object are: </p>
<ul><li><a href="rzaikcwbrccreatepgm.htm#cwbrc_createpgm">cwbRC_CreatePgm</a></li>
<li><a href="rzaikcwbrcaddparm.htm#cwbrc_addparm">cwbRC_AddParm</a></li>
<li><a href="rzaikcwbrcgetparmcount.htm#cwbrc_getparmcount">cwbRC_GetParmCount</a></li>
<li><a href="rzaikcwbrcgetparm.htm#cwbrc_getparm">cwbRC_GetParm</a></li>
<li><a href="rzaikcwbrcgetpgmname.htm#cwbrc_getpgmname">cwbRC_GetPgmName</a></li>
<li><a href="rzaikcwbrcgetlibname.htm#cwbrc_getlibname">cwbRC_GetLibName</a></li>
<li><a href="rzaikcwbrcsetparm.htm#cwbrc_setparm">cwbRC_SetParm</a></li>
<li><a href="rzaikcwbrcsetpgmname.htm#cwbrc_setpgmname">cwbRC_SetPgmName</a></li>
<li><a href="rzaikcwbrcsetlibname.htm#cwbrc_setlibname">cwbRC_SetLibName</a></li>
<li><a href="rzaikcwbrcdeletepgm.htm#cwbrc_deletepgm">cwbRC_DeletePgm</a></li>
</ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaikapprc.htm" title="The iSeries Access for Windows Remote Command/Distributed Program Call APIs allow the PC application programmer to access functions on the iSeries system. User program and system commands can be called without requiring an emulation session. A single iSeries program serves commands and programs, so only one iSeries job is started for both.">iSeries Access for Windows Remote Command/Distributed Program Call APIs</a></div>
</div>
</div>
</body>
</html>