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



This is the way I have made it work:

The Java client must build a string representation of an array.  Basically
it must build each element (including spaces).  Pass this as a large string
to the RPG stored procedure.  It should also pass a count of how many
elements to process.

RPG CODE: (Excuse the spacing)

D W_CNT           S             11S 0
D I_CNT           S             11S 0
D I_ARRAY         S           2048A
D W_ARRAY         S                   LIKE(W_ARYSTRUCT) DIM(128)
 *
D W_ARYSTRUCT     DS
D  W_FIELD                      10A
D  W_QTY                         6S 0
 *
C     *ENTRY        PLIST
C                   PARM                    I_ARRAY
C                   PARM                    I_CNT
 *
C                   MOVEA     I_ARRAY       W_ARRAY
 *
C                   FOR       W_CNT = 1 TO I_CNT BY 1
C                   EVAL      W_ARYSTRUCT = W_ARRAY(W_CNT)
 *   Process the data
C                   ENDFOR

Good luck,
Schadd Gray
Prodata Computer Services, Inc.
www.prodatacomputer.com/ste.htm
STE (Stored Procedure Test Environment)

----- Original Message ----- 
From: "Mohammad Tanveer" <mtanveer@xxxxxxxxxxxxxxxxx>
To: "'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
Sent: Thursday, April 06, 2006 2:08 PM
Subject: RE: Passing Arrays to Stored Procedure


> How can I define the SQL stored procedure for this?  So that I can call it
> from Java.
>
>
>
> -----Original Message-----
> From: midrange-l-bounces@xxxxxxxxxxxx
> [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
> Michael_Schutte@xxxxxxxxxxxx
> Sent: Thursday, April 06, 2006 10:36 AM
> To: Midrange Systems Technical Discussion
> Subject: Re: Passing Arrays to Stored Procedure
>
> D proc     PR
> D  parm1                    10    Dim(10)
>
> Obviously, this isn't lined up.
>
>
> Michael Schutte
> Work 614-492-7419
> email  michael_schutte@xxxxxxxxxxxx
>
>
>
>              "Mohammad
>              Tanveer"
>              <mtanveer@forever                                          To
>              living.com>               "'Midrange Systems Technical
>              Sent by:                  Discussion'"
>              midrange-l-bounce         <midrange-l@xxxxxxxxxxxx>
>              s@xxxxxxxxxxxx                                             cc
>                                        "'Java Programming on and around
>                                        the iSeries / AS400'"
>              04/06/2006 01:03          <java400-l@xxxxxxxxxxxx>
>              PM                                                    Subject
>                                        Passing Arrays to Stored Procedure
>
>              Please respond to
>              Midrange Systems
>                  Technical
>                 Discussion
>              <midrange-l@midra
>                  nge.com>
>
>
>
>
>
>
> Is it possible to pass arrays from java to a stored procedure/ SQL or
> RPGLE?
> If yes how?
>
> Thanks
>
>
>
> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>
>
> -- 
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>
>
> -- 
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.