• Subject: Re: Native JDBC Driver and Library List Problems
  • From: Jim Mason <JEMason@xxxxxxxxxxxxxx>
  • Date: Thu, 24 Aug 2000 22:06:45 -0400

Hi Alan.

For the JDBC job library list, try the following tips ...


        Specifying the library for JDBC to use ....

        Options include:

        1       using a url that is qualified by the library
                        For the Java toolkit:
                                        String aUrl =
"jdbc:as400://MYAS400/MYLIB";
                        For the Java JDK
                                        String aUrl =
"jdbc:db2://MYAS400/MYLIB";

                        where MYAS400 = the RDBDIRE for your local database
(see WRKRDBDIRE)
                                        MYLIB = your AS/400 library


        2       using a properties object with a library list for the
connection
                                Properties p = new Properties();
                                p.put("naming", "sql");
                                p.put("user", "jimmason");
                                p.put("password", "jim");
                                p.put("libraries", "LIB1 LIB2 *LIBL LIB3");
                                Connection =
DriverManager.getConnection("jdbc:db2://MYAS/400, p);




        3       using a program in QGPL that is called to set the library
list dynamically based on a passed parm, data area or data queue for a job


        the only negatives to 1 and 2 are the fact means for qualifying the
connection are specific to each driver type.
        If your application switches drivers for portability, you must deal
with this.
        Option 3 is generic but requires writing a simple CL program to set
a library list.  I've used it very successfully with JDBC.



Jim Mason



Message text written by INTERNET:JAVA400-L@midrange.com
>
Thanks to Arlene Soderlund for her suggestion but unfortunately,  it does
not correct my problem.  The command I used is as follows:

SBMJOB CMD(CALL PGM(HEITKA01/IMINTCL)) JOB(IMINTCL) JOBD(HEITKA01/IMINT)
INLLIBL(*JOBD)

Using WRKACTJOB, I verified that the IMINTCL job has the correct library
list.  In addition I also verified that the QJVACMDSRV job that is spawned
also has the correct library list.  My java program calls DB2 stored
procedures, so a third job called QSQSRV running as QUSER is spawned and I
suspect that this is the component that is not getting the library list
from what is specified on the SBMJOB command.  I get error CPF4101 because
the stored procedure is trying to access a file not in the library list.
The QSQSRV job does not appear in the WRKACTJOB list when this error occurs
so I can not actually see the library list.

If I change my user profile to point the job description using "CHGUSRPRF
USRPRF(HEITKA01) JOBD(HEITKA01/IMINT)", then submit the job it works fine.

Any help would be greatly appreciated.

Thanks,


Alan A. Heitkamp
H.B. Fuller Company
(651) 236-4072
Al.Heitkamp@hbfuller.com

<

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

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.