473,387 Members | 1,569 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,387 software developers and data experts.

settign DB2 environment under Windows without using db2cw.bat

Hello,

I've to script sth under Windows and would like to set the DB2
environment w/o that batch file to stay at my bash prompt. How can I do
that ?
--
MfG/Sincerely

Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
Aug 8 '08 #1
6 4758
toralf wrote:
Hello,

I've to script sth under Windows and would like to set the DB2
environment w/o that batch file to stay at my bash prompt. How can I do
that ?
I think the safest way to do that is not to do it. Instead, run db2cw from
a cmd prompt, and then from there, run bash. That way, bash will merely
inherit the environment instead of having to figure it out yourself. Also,
if db2cw.bat is updated in a fix pack or something, your environment will
stay up to date (i.e., the next time you run it, just like everyone else).

Or, if this is all scripting, just write a batch file around your shell
script which merely calls db2cw first, and then runs bash with your current
script. This is what, as an example, C programs would have to do if they
can't just set the environment themselves: they rely on the user having set
up the DB2 environment first.
Aug 8 '08 #2

yep, found this in the mean while
http://bytes.com/forum/thread495149.html

--
MfG/Sincerely

Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
Aug 11 '08 #3
toralf wrote:
http://bytes.com/forum/thread495149.html
What version of DB2 you are using?

Jan M. Nelken
Aug 12 '08 #4
Darin McBride wrote:
toralf wrote:
>Hello,

I've to script sth under Windows and would like to set the DB2
environment w/o that batch file to stay at my bash prompt. How can I do
that ?

I think the safest way to do that is not to do it. Instead, run db2cw from
a cmd prompt, and then from there, run bash. That way, bash will merely
inherit the environment instead of having to figure it out yourself. Also,
if db2cw.bat is updated in a fix pack or something, your environment will
stay up to date (i.e., the next time you run it, just like everyone else).

Or, if this is all scripting, just write a batch file around your shell
script which merely calls db2cw first, and then runs bash with your current
script. This is what, as an example, C programs would have to do if they
can't just set the environment themselves: they rely on the user having set
up the DB2 environment first.
You're right, in the mean while l found
Ihttp://bytes.com/forum/thread495149.htm

--
MfG/Sincerely

Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
Aug 13 '08 #5
Jan M. Nelken wrote:
toralf wrote:
> http://bytes.com/forum/thread495149.html

What version of DB2 you are using?
Database server = DB2/NT 8.2.0

--
MfG/Sincerely

Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
Aug 13 '08 #6
toralf wrote:
Jan M. Nelken wrote:
>toralf wrote:
>> http://bytes.com/forum/thread495149.html
What version of DB2 you are using?
Database server = DB2/NT 8.2.0

Ah - in that case you have to use my solution you found earlier. In
Version 9 you could use SET DB2CLP=**$$** and use ordinatory Command
Window to issue DB2 commands - hence you could use all scripting tools
Windows have (for example PowerShell from Microsoft.

Keep in mind that support for V8 may end in April 2009.
Jan M. Nelken
Aug 13 '08 #7

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

Similar topics

8
by: sebastien.hugues | last post by:
Hi I would like to retrieve the application data directory path of the logged user on windows XP. To achieve this goal i use the environment variable APPDATA. The logged user has this name:...
15
by: Ville Vainio | last post by:
Pythonic Nirvana - towards a true Object Oriented Environment ============================================================= IPython (by Francois Pinard) recently (next release - changes are...
19
by: Vijay Kumar R Zanvar | last post by:
Hi clc, I want to know few examples of freestanding environments. -- "There's money in this case, Watson," he continued, glancing out of the window, "if there is nothing else." - A Scandal...
3
by: Don Stevic | last post by:
Hey there I have beentrying to get a windows form to send an email thru outlook and cannot find the right code. Does anyone know how to do this? Thanks *** Sent via Developersdex...
6
by: Fuzzyman | last post by:
Hello all, I would like to set a Windows Environment variable for another (non-child) process. This means that the following *doesn't* work : :: os.environ = value In the ``win32api``...
4
by: Richard Levasseur | last post by:
(Forewarning, most of these problems and solutions come from being the only developer in a 1 server department with no budget, few resources, unresponsive IT, and non-technical managers, so thats...
11
by: rossum | last post by:
I want to declare a const multi-line string inside a method, and I am having some problems using Environment.NewLine. I started out with: class foo { public void PrintStuff() { const...
2
by: =?Utf-8?B?RGFuaWVsIERpVml0YQ==?= | last post by:
I had asked this question about a week ago, but never got any feedback. I am going to post it again: I need some advice on how I should setup my development environment. I am developing in...
4
by: Max2006 | last post by:
Hi, I am using ActiveDirectoryMembershipProvider for authentication. In my development environment I don't have any Active Directory available for development and test. Basically my development...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.