I agree with David. Using a ProgramCallDocument just seems easier to me. It
could ALMOST be considered and interface, maybe a better term would be a
defined contract. Plus the ProgramCallDocument.getValue(String) returns an
Object so all you have to do is cast, not create the object from a byte

The one draw back is there is no native date handling.

Here is a simple example.

<pcml version="4.0">
<program name="DELETEORDER" path="/QSYS.LIB/%LIBL%/WVOE01R.PGM">
<data name="INCOMPANYID" type="int" length="4" precision="31"
usage="input" />
<data name="INCUSTOMERID" type="char" length="15" usage="input" />
<data name="INSHIPTO" type="char" length="15" usage="input" />
<data name="INORDERNUMBER" type="int" length="4" precision="31"
usage="inputoutput" />

public boolean deleteOrder(OrderHeader header) {
String module = "DELETEORDER";
try {
ProgramCallDocument pcmlDoc = createPCMLDoc("WVOE01R");
pcmlDoc.setValue(module + ".INCOMPANYID",
pcmlDoc.setValue(module + ".INCUSTOMERID",
pcmlDoc.setValue(module + ".INSHIPTO", header.getShipToId());
.setValue(module + ".INORDERNUMBER", header
return call(pcmlDoc, module);
} catch (PcmlException e) {
"Could not delete the order.", e);
return false;
James R. Perkins

On Wed, Oct 28, 2009 at 07:25, Dan Kimmel <dkimmel@xxxxxxxxxxxxxxx> wrote:

I've been using ProgramCall successfully for years. You have to get the
datatypes right and do the conversions, but once you've got one, all the
rest come pretty easily. And I have some with lots and lots of
parameters going both directions with lots of data types. What do think
is the advantage of PCML? Don't you have to do basically the same thing
in a different format?

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of David Gibbs
Sent: Wednesday, October 28, 2009 9:06 AM
To: Java Programming on and around the iSeries / AS400
Subject: Re: Retrieving integer parameter after JT400 ProgramCall?

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page