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




Hi,

I use the following code, to work with library-lists and jdbc-connections.

Marc N.

--> get the library-list, currently setup: -->

Properties prop = System.getProperties();
// System.out.println(prop.toString());
libListForm1 = prop.getProperty("java.library.path");
return libListForm1;

--> then some transformations ->

String temp1 =
stringReplace(libListForm1, "/QSYS.LIB/", "");
temp1 =     stringReplace(temp1, ".LIB", "");
temp1 =     stringReplace(temp1, ":", " ");

libListForm2 = temp1;
return libListForm2;

String temp1 =
stringReplace(libListForm2, "QSHELL", "");

temp1 =     stringReplace(temp1, "QJAVA", "");

libListForm3 = temp1;
return libListForm3;

--> to use the libl in a jdbc-connection: -->

protected Properties connProps = new Properties();

connProps.setProperty("naming", "system");
connProps.setProperty("libraries", libl);

Class.forName(driver);
connection = DriverManager.getConnection(dburl, connProps);

(I wrote the method stringReplace as the java...String.replace is only
available since jdk 1.4; but we have 1.3 on the AS400. I can give you the
code, if wanted)







"David Morris" <David.Morris@xxxxxxxxxxxxx>@midrange.com on 18/07/2003
19:41:06

Please respond to Java Programming on and around the iSeries / AS400
       <java400-l@xxxxxxxxxxxx>

Sent by:    java400-l-bounces@xxxxxxxxxxxx


To:    <java400-l@xxxxxxxxxxxx>
cc:

Subject:    Re: Recognizing the Library list using the AS/400 Java
       Development toolkit


Up until V5R2, you could set the library for the native drive in
a CLI exit program and it would keep that library list for all threads.

On V5R2, each new thread starts with the user's jobd library
list so you can't use the exit to set the library list. There is no
mention of this change in the memo to users and the documentation
for the CLI exit still says it can be used to set the library list.
Anyone
have any insight on why this changed and how to set it back to the old

way? I sent this on to IBM a couple of weeks ago but haven't heard
back.

David Morris


>>> kulkarni_ash1312@xxxxxxxxx 7/18/2003 11:10:47 AM >>>
Hi,

If u dont provide any library for connection and set
naming=system while creating connection, then the
connection will have the library list from the job
description of the user who has created the
connection.
so u can change the jobdescription to have the
neccessary libraries
Ashish
--- Franco Biaggi <fbiaggi@xxxxxxxxxx> wrote:
> If I right understand your problem,
> you van set the LIBL in the connection URL:
> example:
>
> jdbc:as400://10.1.1.50;translation
>
isolation=none;naming=system;libraries=lib1,lib2,qgpl,qtemp;block
> size=128;extended
> dynamic=true;package=MYPKG;package
> cache=true;package library=qgpl
>
> On Fri, 18 Jul 2003 10:43:56 -0400, McNeal, John
> wrote:
>
> >  We are using the AS/400 Java Development toolkit.
>  In our environment,
> >our library list changes with each release and
> environment (production
> >verses QA,  ECT).  Is there a way to have the
> classes provided by the AS/400
> >Java Development toolkit to recognize the *LIBL ?
> It would be a major
> >configuration nightmare for use to have to hard
> code the library name,  or
> >store it in a configuration files since our objects
> reside in multiple
> >libraries (and programs in multiple libraries).
> Has anyone else had this
> >problem,  and do you know if a work around exist.
>
> >   John McNeal
_______________________________________________
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 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.