When using the JDBC driver to access files in various databases I would like to use the current library list for the job rather than the user's jod description...
i.e. How can I set the library list to use the current library list rather than the user's job description.
e.g. So that regardless of whether the program is in Development, Integration or User Testing enviroments it will use the correct library list...
Example of my current code to connect to database...
Properties properties = new Properties ();
properties.put("user", "user");
properties.put("password", "password");
properties.put("naming", "system");
properties.put("libraries", "*LIBL");
try {
Class.forName("com.ibm.db2.jdbc.app.DB2Driver");
connection = DriverManager.getConnection("jdbc:db2:*local", properties);
Software/Hardware used:
ASKED:
May 31, 2006 3:38 AM
UPDATED:
November 21, 2010 11:50 AM
Hi,
I could replace *LIBL with the libraries I want, and that does work, but I want the program to be able to reconise what the current library list is as in my enviroment the library list can be different for different sets of data. I.e. I want to be able to run the same program over different enviroments… E.g. send an email with data from a specific file which is the same file, but stored in different libraries, for different clients.
Cheers
G
I want the program to be able to reconise what the current library list is as in my enviroment the library list can be different for different sets of data.
If different environments use different sets of libraries, it doesn’t make much sense to have them all using the same job description with the same library lists.
A job description is essentially the only system facility that holds library lists except for the QUSRLIBL system value and for running jobs. A major purpose of a *JOBD is to deliver a library list. They’re small objects that are easy to maintain. Create more of them and use them.
Why look for a programming solution for something already provided by the system?
Tom