ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/rzahhxpcmlexmplconcreate.htm

60 lines
3.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="Example: Using condensed XPCML to create a ProgramCallDocument object" />
<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="rzahhxpcmlexmplconcreate" />
<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: Using condensed XPCML to create a ProgramCallDocument object</title>
</head>
<body id="rzahhxpcmlexmplconcreate"><a name="rzahhxpcmlexmplconcreate"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: Using condensed XPCML to create a ProgramCallDocument object</h1>
<div><div class="section"><p>Some ProgramCallDocument constructors accept a condensedXPCML
source file and corresponding schema (.xsd file). This enables you to use
condensed XPCML to create a ProgramCallDocument object.</p>
<p>The previously
mentioned constructors require that you provide the following parameters:</p>
<ul><li>A String that specifies a condensed XPCML file</li>
<li>An InputStream that contains the type definitions created by running condenseXPCML()</li>
</ul>
<p>Using these constructors loads and parses a condensed XPCML file.
Additionally, the process logs any parse errors. After completing the parse,
the constructor creates a ProgramCallDocument object.</p>
<p>The following Java™ code
example uses condensed XPCML to create a ProgramCallDocument object. The example
code assumes the following</p>
<ul><li>The name of the condensed XPCML file is myCondensedXPCML.xpcml</li>
<li>The name of the extended schema is myXSD.xsd</li>
</ul>
<p>The code then uses the ProgramCallDocument object to run program qusrjobi_jobi0100.</p>
<pre> AS400 system = new AS400();
// Create a ProgramCallDocument and parse the file.
ProgramCallDocument xpcmlDoc =
new ProgramCallDocument(system,
"myCondensedXPCML.xpcml",
new FileInputStream("myXSD.xsd"));
boolean rc = xpcmlDoc.callProgram("qusrjobi_jobi0100");</pre>
<div class="note"><span class="notetitle">Note:</span> The
XPCML code that you use to call the program (after creating the ProgramCallDocument
object) is the same as the code you would use with PCML.</div>
</div>
</div>
</body>
</html>