× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yes it is. If you don't instantiate the object it's by default set to null.
It would be luck passing *OMIT to an RPG program if you did not instantiate
it.

You might not however need to create one for each parameter though. Maybe
just one for each type. I would need to look into a bit more to be sure on
that. I don't use program calls like this too often.

--
James R. Perkins
http://twitter.com/the_jamezp


On Tue, Nov 3, 2009 at 14:47, Pete Hall <pete@xxxxxxxxxxxxxx> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is it really necessary to do this in order to get the data returned into
a java variable? I'm assuming that I need to create an AS400<whatever>
object to act as a template, so I create one for each bi-directional
parameter. Is that right, or am I just making a lot of work for myself?

int myPackedVar = 0;
AS400PackedDecimal myPackedParm = new AS400PackedDecimal(5, 0);
... snip ...
parms[5] = new ProgramParameter(
myPackedParm.toBytes(myPackedVar), 5);
if (myProgramCall.run()) {
... snip ...
if (parms[5].getOutputDataLength() > 0)
myPackedVar = Integer.parseInt(
myPackedParm.toObject(
parms[5].getOutputData()).toString());
}
}

- --
Pete Hall
pete@xxxxxxxxxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrwsxYACgkQXczQcKdXKg70MACeN6vtpMt+5JjfnZ8m16CIRap8
fkIAoKn4X9zroPS5XhE42Ki1gSA+xGbi
=zHzK
-----END PGP SIGNATURE-----
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.