93 lines
4.8 KiB
HTML
93 lines
4.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="Example: Obtaining program call results as condensed XPCML" />
|
|
<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="rzahhxpcmlexmplconobtain" />
|
|
<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: Obtaining program call results as condensed XPCML </title>
|
|
</head>
|
|
<body id="rzahhxpcmlexmplconobtain"><a name="rzahhxpcmlexmplconobtain"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Example: Obtaining program call results as condensed XPCML </h1>
|
|
<div><div class="section"><p>You use the same process to obtain the results of a program call
|
|
as condensed XPCML or noncondensed XPCML. All you need to do is call ProgramCallDocument.generateXPCML().</p>
|
|
<p>Use
|
|
setXsdName() to specify the name of the extended schema, which generateXPCML()
|
|
uses to generate the noNamespaceSchemaLocation attribute of the <xpcml>
|
|
tag in the condensed XPCML.</p>
|
|
<p>Using setXsdName() is important when you
|
|
want to use the program call results (in condensed XPCML) as source for another
|
|
ProgramCallDocument object. You must specify the name of the extended schema
|
|
so that the parser knows which schema file to use when parsing.</p>
|
|
<p>For
|
|
example, the following code obtains the results from a program call and generates
|
|
condensed XPCML. </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");
|
|
|
|
if (rc) // Program was successful
|
|
{
|
|
xpcmlDoc.setXsdName("myXSD.xsd");
|
|
xpcmlDoc.generateXPCML("qusrjobi_jobi0100","XPCMLOut.xpcml");
|
|
}</pre>
|
|
<p>The following code shows an example of obtaining program
|
|
call results as condensed XPCML:</p>
|
|
<pre> <xpcml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="myXSD.xsd" version="4.0">
|
|
|
|
<program name="qusrjobi_jobi0100" path="/QSYS.LIB/QUSRJOBI.PGM">
|
|
<parameterList>
|
|
<structParm name="receiverVariable" passDirection="out"
|
|
outputSize="lengthOfReceiverVariable" struct="jobi0100"/>
|
|
<numberOfBytesReturned_>100</numberOfBytesReturned_>
|
|
<numberOfBytesAvailable_>100</numberOfBytesAvailable_>
|
|
<structParm name="qualifiedJobName"
|
|
struct="qualifiedJobName">
|
|
<jobName_>*</jobName_>
|
|
<userName_/>
|
|
<jobNumber_/>
|
|
</structParm>
|
|
<internalJobIdentifier_/>
|
|
<jobStatus_>ACTIVE</jobStatus_>
|
|
<jobType_>PJ</jobType>
|
|
<jobSubtype_/>
|
|
<stringParm length="2"/>
|
|
<runPriority_>5</runPriority>
|
|
<timeSlice_/>
|
|
<defaultWait_>10</defaultWait_>
|
|
<purge_/>
|
|
</structParm>
|
|
<lengthOfReceiverVariable_>86</lengthOfReceiverVariable_>
|
|
<formatName_>JOBI0100</formatName_>
|
|
<structParm name="qualifiedJobName" passDirection="in" struct="qualifiedJobName"/>
|
|
<internalJobIdentifier_> </internalJobIdentifier_>
|
|
<errorCode_>0</errorCode_>
|
|
</parameterList>
|
|
</program>
|
|
</xpcml></pre>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |