× 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.



Thanks to both David and Barbara for your comments, I have made those
changes but that doesn't address my main problem which is how to compose
the input argument when the service pgm is expecting a data structure
with many different data types in it.  Any ideas on that?

Here is the data structure:
     D CallRPG_myDS    DS                  Qualified
     D  alpha1                       10A
     D  alpha2                        5A
     D  int1                         10P 0
     D  packed1                       3P 0   

How do I put data into the appropriate Java objects to make it work?
Seems like they shortchanged the documentation.

Aaron Bartell

 

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] 
Sent: Monday, August 09, 2004 11:48 AM
To: java400-l@xxxxxxxxxxxx
Subject: Re: JTOpen - ServiceProgramCall

"Bartell, Aaron L. (TC)" wrote:
> 
> I am trying to call the following RPG Service program using the 
> ServiceProgramCall Class.  The input and output parms are data 
> structures (I can get it to work with regular fields but not with data

> structures).
> ...
>      P CallRPG_ds      B                   Export
>      D CallRPG_ds      PI
>      D  pInput                             Value LikeDS(CallRPG_myDS)
>      D  pOutput                            LikeDS(CallRPG_myDS)
> ...

Aaron, I think ServiceProgramCall only supports 4-byte-integer and
pointer parameters when passed by value.  Any types other than
4-byte-integer have to be passed by reference (passing a pointer by
value).  Your first parameter would have to be passed by reference (use
CONST in the RPG).  If you can't change the parameter because you
already have RPG callers of this procedure, make a wrapper procedure
CALLRPG_ds2 with parameters by reference that calls through to
CallRPG_ds passing them by value.  Then Java can call CallRPG_ds2 and
your other callers can continue to call CallRPG_ds.

--
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 ...

Follow-Ups:

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.