It is how we write java stored procedure... Not how to write SQL statements.

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dan Kimmel
Sent: 30 July 2010 15:54
To: Java Programming on and around the iSeries / AS400
Subject: RE: java Stored procedure on AS400

Use SET in your stored procedure.

SET variable1, variable2 = SELECT COLUMN1, COLUMN8 FROM QGPL.TABLE1 WHERE COLUMN1 LIKE 'FILE%';

The resultset must be only one record. With this query you'd want to declare a cursor and loop around the SET statement.

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Ashish Kulkarni
Sent: Thursday, July 29, 2010 4:01 PM
To: Java Programming on and around the iSeries / AS400
Subject: Re: java Stored procedure on AS400

Hi
Thanks, i was also looking to create SQL stored procedure, i am trying this from iseries navigator and getting error

SELECT COLUMN1, COLUMN8 INTO :variable1, :variable2 FROM QGPL.TABLE1 WHERE
COLUMN1 LIKE 'FILE%';

I am getting error as below, any ideas


Token : was not valid. Valid tokens: <IDENTIFIER>.

Message ID: SQL0104

Cause . . . . . : A syntax error was detected at token :. Token : is
not
a valid token. A partial list of valid tokens is <IDENTIFIER>. This list assumes that the statement is correct up to the token. The error may be earlier in the statement, but the syntax of the statement appears to be valid up to this point.
On Thu, Jul 29, 2010 at 4:47 PM, Mike Cunningham
<mike.cunningham@xxxxxxx>wrote:


http://www.redbooks.ibm.com/redbooks/SG246503/wwhelp/wwhimpl/js/html/w
whelp.htm



-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:
java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Cunningham
Sent: Thursday, July 29, 2010 4:42 PM
To: Java Programming on and around the iSeries / AS400
Subject: RE: java Stored procedure on AS400

I think you can but indirectly. You need to specify a high-level
language for the procedure (RPG or COBOL or CL?) and that HLL could
call a java routine. I have not done this but I think there was a
thread about this some time ago.

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:
java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Ashish Kulkarni
Sent: Thursday, July 29, 2010 4:26 PM
To: Java Programming on and around the iSeries / AS400
Subject: java Stored procedure on AS400

Hi
Is it possible to create stored procedure in java on AS400, we have
been creating stored procedure in RPGLE, is there any documentation
available to show how to do this

--
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com
--
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.

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

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




--
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com
--
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.



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



Consider the environment and think before you print this email.

Registered Address: Fortis House Tollgate Eastleigh Hampshire SO53 3YA Registered Number: 354568 England
Authorised and regulated by the Financial Services Authority

This e-mail together with any attachments are intended for the addressee only and may be private and confidential. If you are not the intended recipient, or the person responsible for delivering it to the intended recipient, you must not open any attachments, or copy, disclose, distribute, retain or use this e-mail, including any attachments, in any way whatsoever; please return it to us immediately using the reply facility on e-mail.

Consider the environment and think before you print this email.


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