MIDRANGE dot COM Mailing List Archive



Home » JAVA400-L » November 2000

Re: FW: FW: AS400 Question.


  • Subject: Re: FW: FW: AS400 Question.
  • From: kulack@xxxxxxxxxx
  • Date: Thu, 16 Nov 2000 09:53:24 -0600
  • Importance: Normal

fixed


Ok, just a terminology thing here. Those APIs are NOT using the DDM server.
The DDM server is used when the record level I/O apis are used.
When using the JDBC apis, the database server is used.
End of terminology...

I presume that the actual code is complete, and actually does set all of
the
input/output parameters and performs an execute of the callable statement.

Can I ask what happens to the code that runs? I.e. a java call stack from
the exception
that occurs, a joblog message on the backend server... Anything?

It looks to me like you might be trying to call a generic program instead
of
a stored procedure. DB2/400 lets you do this to some extent, but in some
cases, there is critical information about parameter types, return types,
language, etc. that can only be accessed by the JDBC driver if
the program is an actual stored procedure.
This information could be incorrect if you've never done actually
created a stored procedure for the program.

In this case, as part of your installation/setup, you should use the SQL
statement "CREATE PROCEDURE" to create a stored procedure in the
SYSPROCs catalog that refers to this program so JDBC and the
database can know about its properties.



"Do you believe that my being stronger or faster has anything
 to do with my muscles in this place?" ... "Free your mind."
Laurence Fishburne as Morpheus in 'The Matrix'.

Fred A. Kulack  -  AS/400e  Java and Java DB2 access, Jdbc, JTA, etc...
IBM in Rochester, MN  (Phone: 507.253.5982   T/L 553-5982)
mailto:kulack@us.ibm.com   Personal: mailto:kulack@bresnanlink.net
AOL Instant Messenger: Home:FKulack  Work:FKulackWrk


David Glick <DGlick@dataskill.com>@midrange.com on 11/15/2000 03:38:56 PM

Please respond to JAVA400-L@midrange.com

Sent by:  owner-java400-l@midrange.com


To:   "'JAVA400-L@midrange.com'" <JAVA400-L@midrange.com>
cc:
Subject:  FW: FW: AS400 Question.



Further information regarding the question of connecting to the AS400 DDM
server.  Thanks again.

David Glick
Vice President, Integration Services
DATASKILL, Inc
858-755-3800
dglick@dataskill.com


> -----Original Message-----
> From:   Romeo Maclan
> Sent:   Tuesday, November 14, 2000 1:51 PM
> To:     David Glick
> Subject:     RE: FW: AS400 Question.
>
> I'll rephrase my question to this:
>
> How can I call  stored procedures in the AS400 thru the AS400 DDM server
> using the AS400 Toolbox for Java stored procedure APIs.
> The  Java program resides in a Sun Solaris client machine. The stored
> procedure and DDM server are in the AS400.
> MY code to call a stored procedure :
> /* this code connects to the AS400 */
>    try {
>         java.sql.DriverManager.registerDriver(
>              new com.ibm.as400.access.AS400JDBCDriver());
>         dbConnect =
>              java.sql.DriverManager.getConnection(
>                   "jdbc:as400://" + systemName, userid,
> password);
>    } catch (java.sql.SQLException e) {
>         throw new java.io.IOException(e.getMessage());
>    }
> /* This code prepares the callable statement*/
>    CallableStatement aCS =
>         aCS.dbConnect.prepareCall("CALL
> QGPL.PROCEDURE1(?,?,?,?,?,?,?,?,?,?,?,?,?)");
>    /* register the parameters to the stored procedure statements */
>
>    aCS.registerOutParameter(1, java.sql.Types.CHAR);
>    aCS.setString(1, "TEST");
> The above code apparently does not call a stored procedure thru the DDM
> server. What Java API
> can I use to call AS400 stored procedure thru the AS400 DDM server.
>
>
>
>  -----Original Message-----
> From:   David Glick
> Sent:   Tuesday, November 14, 2000 1:31 PM
> To:     Romeo Maclan
> Subject:     RE: FW: AS400 Question.
>
> Romeo,
>
> Do you want to try publishing a code snippet that doesn't work?
>
> David
>
>
>    -----Original Message-----
>    From:     Romeo Maclan
>    Sent:     Tuesday, November 14, 2000 1:17 PM
>    To:  David Glick
>    Subject:  RE: FW: AS400 Question.
>
>    Dave:
>    Thanks for publishing my question.
>
>    I actually just use  straight JDBC calls. For the driver I use the
> AS400 JDBC driver.
>    The answer does not help much since all this information can be
> found in the AS400 Toolbox for Java Redbook.
>
>    Will wait for some more responses.
>
>    Thanks,
>    Romeo
>
>          -----Original Message-----
>         From:     David Glick
>         Sent:     Tuesday, November 14, 2000 1:09 PM
>         To:  Romeo Maclan
>         Cc:  Robert Heavill; Wolfgang Black
>         Subject:  FW: FW: AS400 Question.
>
>         Romeo,
>
>         Here's the first response to your question, which raises an
> interesting point:  have you tried using straight JDBC calls to access
the
> stored procedures?
>
>         David
>
>         David Glick
>         Vice President, Integration Services
>         DATASKILL, Inc
>         858-755-3800
>         dglick@dataskill.com
>
>
>         -----Original Message-----
>         From:     kulack@us.ibm.com [SMTP:kulack@us.ibm.com]
>         Sent:     Tuesday, November 14, 2000 11:03 AM
>         To:  JAVA400-L@midrange.com
>         Subject:  Re: FW: AS400 Question.
>
>
>         I believe the DDM server is only for record level access to
> files.
>         Stored procedures are accessed by using SQL to access
> tables.
>         SQL is done through the JDBC driver and the database server.
>
>         Use JDBC, SQL, and the Database server to call stored
> procedures.
>
>
>         "Do you believe that my being stronger or faster has
> anything
>          to do with my muscles in this place?" ... "Free your mind."
>         Laurence Fishburne as Morpheus in 'The Matrix'.
>
>         Fred A. Kulack  -  AS/400e  Java and Java DB2 access, Jdbc,
> JTA, etc...
>         IBM in Rochester, MN  (Phone: 507.253.5982   T/L 553-5982)
>         mailto:kulack@us.ibm.com   Personal:
> mailto:kulack@bresnanlink.net
>         AOL Instant Messenger: Home:FKulack  Work:FKulackWrk
>
>         +---
>         | This is the JAVA/400 Mailing List!
>         | To submit a new message, send your mail to
> JAVA400-L@midrange.com.
>         | To subscribe to this list send email to
> JAVA400-L-SUB@midrange.com.
>         | To unsubscribe from this list send email to
> JAVA400-L-UNSUB@midrange.com.
>         | Questions should be directed to the list owner:
> joe@zappie.net
>         +---
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---



+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---





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

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact