89 lines
5.4 KiB
HTML
89 lines
5.4 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="Using XPCML to call a program on your iSeries server" />
|
|
<meta name="abstract" content="After you create your XPCML file, you need to create a ProgramCallDocument object that can use the XPCML specifications and data values to call a program on your iSeries server." />
|
|
<meta name="description" content="After you create your XPCML file, you need to create a ProgramCallDocument object that can use the XPCML specifications and data values to call a program on your iSeries server." />
|
|
<meta name="DC.Relation" scheme="URI" content="rzahhxpcmlusing.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzahhxpcmlusingregcreate" />
|
|
<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>Using XPCML to call a program on your iSeries server</title>
|
|
</head>
|
|
<body id="rzahhxpcmlusingregcreate"><a name="rzahhxpcmlusingregcreate"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Using XPCML to call a program on your iSeries server</h1>
|
|
<div><p>After you create your XPCML file, you need to create a ProgramCallDocument
|
|
object that can use the XPCML specifications and data values to call a program
|
|
on your iSeries™ server.</p>
|
|
<div class="section"><p> Create an XPCML ProgramCallDocument by passing in the name of
|
|
your XPCML file on the ProgramCallDocument constructor. Creating an XPCML
|
|
ProgramCallDocument in this way first parses and validates your XPCML document,
|
|
then creates the ProgramCallDocument object.</p>
|
|
<p>In order to parse and validate
|
|
the XPCML document, make sure that your CLASSPATH includes a fully validating
|
|
XML parser. For more information about requirements to run XPCML, see the
|
|
following page:</p>
|
|
<blockquote><a href="rzahhxpcmlrequire.htm">Requirements for using XPCML</a></blockquote>
|
|
<p>The
|
|
following example shows how to create a ProgramCallDocument object for the
|
|
XPCML file, myXPCML.xpcml.</p>
|
|
<pre> system = new AS400();
|
|
// Create a ProgramCallDocument into which to parse the file.
|
|
ProgramCallDocument xpcmlDoc =
|
|
new ProgramCallDocument(system, "myXPCML.xpcml");</pre>
|
|
<p>The
|
|
only difference between creating an XPCML ProgramCallDocument and a PCML ProgramCallDocument
|
|
is that you pass the constructor an XPCML document instead of a PCML document.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> You
|
|
must specify .xpcml as the file extension for XPCML files. Using .xpcml as
|
|
the file extension ensures that the ProgramCallDocument class recognizes the
|
|
file as XPCML. If you do not specify an extension, ProgramCallDocument assumes
|
|
that the file is PCML.</div>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Using XPCML to call a program on your iSeries server</h4><p>After you create
|
|
the ProgramCallDocument object, use any of the methods of the ProgramCallDocument
|
|
class to work with your XPCML document. For example, call an iSeries program
|
|
by using ProgramCallDocument.callProgram() or change the value for an XPCML
|
|
input parameter before calling the server program by using the appropriate
|
|
ProgramCallDocument.setValue method.</p>
|
|
<p>The following example shows how
|
|
to create a ProgramCallDocument object for an XPCML file (named myXPCML.xpcml).
|
|
After creating the ProgramCallDocument object, the example calls a program
|
|
(PROG1) that is specified in the XPCML document. In this case, the only difference
|
|
between using XPCML and PCML is that the example passes an XPCML file to the
|
|
ProgramCallDocument constructor.</p>
|
|
<p>After your application reads and parses
|
|
an XPCML document, the XPCML document functions just like a PCML document.
|
|
At this point, XPCML can use any of the existing methods that PCML uses.</p>
|
|
<pre> system = new AS400();
|
|
|
|
// Create a ProgramCallDocument into which to parse the file.
|
|
ProgramCallDocument xpcmlDoc = new ProgramCallDocument(system, "myXPCML.xpcml");
|
|
|
|
// Call PROG1
|
|
boolean rc = xpcmlDoc.callProgram("PROG1");</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzahhxpcmlusing.htm" title="Using XPCML is similar to using PCML. The following steps serve as a general outline for the actions that you need to perform to use XPCML.">Using XPCML</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |