473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

java invocation of db2 clp

Hello,

I am trying to implement some etl feature driven by a java application. I
must work on windows and unixes, possibly without using command scriptings
or shells. I am focussing on windows. I try to have several load operations
executed inside a single connection. I can't succeed in doing that fully
from java, with calling db2 executable. The best I can do for now is to
lauch a db2cmd, get the db2clp env variable and then pass it to the java
programs exec("db2 ...") command. But I don't see how to initiate the CLP in
java (this launches au db2bp process, and it has to give the correct ID for
the java program to comunicate with it). Any help is welcome! Have a good
day!

Alexandre
Nov 12 '05 #1
6 3186

"Xela" <ab***@yahoo.com> дÈëÓʼþ news:co**********@reader1.imaginet.fr...
Hello,

I am trying to implement some etl feature driven by a java application. I
must work on windows and unixes, possibly without using command scriptings
or shells. I am focussing on windows. I try to have several load operations executed inside a single connection. I can't succeed in doing that fully
from java, with calling db2 executable. The best I can do for now is to
lauch a db2cmd, get the db2clp env variable and then pass it to the java
programs exec("db2 ...") command. But I don't see how to initiate the CLP in java (this launches au db2bp process, and it has to give the correct ID for the java program to comunicate with it). Any help is welcome! Have a good
day!

Alexandre


Maybe you can put these operations into a store procedure, and call it for
Java.
Nov 12 '05 #2
Thank you for your suggestion.

Nevertheless, it is not acceptable for me. What I want is to invocate the
load utility from a java application program. I don't want to put server
side objects for this purpose. I guess that there is a quite simple way to
do this. Are there any parameter to givbe to db2bp? Can the file db2clp.dat
be usefull for this purpose? Thanks for your attention.

Alexandre
"XiaoLu Wang" <ha**********@yahoo.com.cn> wrote in message
news:Ae********************@rogers.com...

"Xela" <ab***@yahoo.com> дÈëÓʼþ news:co**********@reader1.imaginet.fr...
Hello,

I am trying to implement some etl feature driven by a java application. I
must work on windows and unixes, possibly without using command
scriptings
or shells. I am focussing on windows. I try to have several load

operations
executed inside a single connection. I can't succeed in doing that fully
from java, with calling db2 executable. The best I can do for now is to
lauch a db2cmd, get the db2clp env variable and then pass it to the java
programs exec("db2 ...") command. But I don't see how to initiate the CLP

in
java (this launches au db2bp process, and it has to give the correct ID

for
the java program to comunicate with it). Any help is welcome! Have a good
day!

Alexandre


Maybe you can put these operations into a store procedure, and call it for
Java.

Nov 12 '05 #3
Xela wrote:
Thank you for your suggestion.

Nevertheless, it is not acceptable for me. What I want is to invocate the
load utility from a java application program. I don't want to put server
side objects for this purpose. I guess that there is a quite simple way to
do this. Are there any parameter to givbe to db2bp? Can the file
db2clp.dat be usefull for this purpose? Thanks for your attention.


Could you call the LOAD API (possibly via JNI)?

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #4
That would be a solution. But I looked at this and at the data structure
used. It seems to be rather complicated, and a more natural solution would
be to call the utilities. Am I wrong?

Alexandre
"Knut Stolze" <st****@de.ibm.com> wrote in message
news:cp**********@fsuj29.rz.uni-jena.de...
Xela wrote:
Thank you for your suggestion.

Nevertheless, it is not acceptable for me. What I want is to invocate the
load utility from a java application program. I don't want to put server
side objects for this purpose. I guess that there is a quite simple way
to
do this. Are there any parameter to givbe to db2bp? Can the file
db2clp.dat be usefull for this purpose? Thanks for your attention.


Could you call the LOAD API (possibly via JNI)?

--
Knut Stolze
Information Integration
IBM Germany / University of Jena

Nov 12 '05 #5
Xela wrote:
That would be a solution. But I looked at this and at the data structure
used. It seems to be rather complicated, and a more natural solution would
be to call the utilities. Am I wrong?


I don't see why. Basically, the utilities just call the API themselves.
The difference is only that you have to build some sort of text string that
describes the command whereas the API expects the said data structure that
you have to fill in. You only have to fill in some of the information and
not necessarily all of it.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #6
I suppose that the development and debugging effort is bigger using
JNI.Moreover, we know the command line syntax. But if you have some samples
or a link to siome sample using JNI, I would appreciate to see them. Thanks
anyway for your answer.

Alexandre
"Knut Stolze" <st****@de.ibm.com> wrote in message
news:cp**********@fsuj29.rz.uni-jena.de...
Xela wrote:
That would be a solution. But I looked at this and at the data structure
used. It seems to be rather complicated, and a more natural solution
would
be to call the utilities. Am I wrong?


I don't see why. Basically, the utilities just call the API themselves.
The difference is only that you have to build some sort of text string
that
describes the command whereas the API expects the said data structure that
you have to fill in. You only have to fill in some of the information and
not necessarily all of it.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena

Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Keld Hammerum | last post by:
Hi, I am verifying a large DSP algorithm using JBuilder 7 and Windows 2000 Professional. The result of my test depends on the way I run the program, though. Here is the situation: a) I run...
8
by: Steven T. Hatton | last post by:
I've had an idea kicking around in my head regarding how to create a library of classes (templates?) that provide the same kind of functionality as do Java classes which all derive from the UBC...
7
by: Steve M | last post by:
I'm trying to invoke a Java command-line program from my Python program on Windows XP. I cannot get the paths in one of the arguments to work right. The instructions for the program describe the...
5
by: Raquel | last post by:
Trying to use the "DB2 Development Center" on UDB V8 on my Windows XP. I am new to stored procedures. The stored procedure code I am using is at:...
5
by: Alex | last post by:
Hi all, I'm sure this is really really easy but I do need some help. I'm writing a java stored prcedure to manage the assignment of IP addresses to mac addresses for a network device database...
4
by: Rhino | last post by:
I've been playing with Java UDFs for the last couple of days and I've got some questions about scratchpads. I'm running DB2 LUW V8 (FP8) on WinXP. Somewhere in the manuals, I found some remarks...
4
by: acemann7 | last post by:
Windows 2000 udb v 7.2 Got the latest fixpak 13 Applied it. Still can't get a single java sp to run. I used to get reason "2"... now reason "0" - reason 0 is not even documented. I point...
3
by: Aimee | last post by:
I have created an ASP.NET (VB) website and need to invoke a command line application (a Java app) when the user submits a form. What is the best method for approaching this? I've read about...
0
by: Aaron J. Margosis | last post by:
I'm not a Java programmer, but I'm trying to solve some application compatibility issues with locked down security settings on Windows. My question: How do different Java-delivery tools invoke...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.