Heres another variation.
echo on
echo %1%
db2cmd.exe DB2CLP.BAT DB2.EXE "UPDATE DBM CFG USING DIAGLEVEL %1%"
db2cmd.exe DB2CLP.BAT DB2.EXE "quit"
exit
make this an xxxx.bat file and just execute it.
Dan Callahan IT Specialist
603-472-4121 t/l 525-4121
[Email address protected]
[Email address protected]
"Greig Wise "
<db2udbdba-ezmlms
hield-x46265343.x To
[Email Address Removed] "LazyDBA Discussion"
a.com> <[Email address protected]
cc
12/30/2004 10:11
AM Subject
RE: How to launch a batch file ?
I think what you're trying to do here is launch a batch file by clicking
on it in Windows rather than running it as a command, right?
The problem is that anytime you have db2 commands in a batch file, it
needs to be run within db2's environment. Just opening a batch file in
Windows will create a normal Command Shell, but not a db2 command shell.
In order to get around this, create a shortcut to your batch file and
setup the target to look like this:
Db2cmd batch.bat
If you want the command window to automatically close after running the
batch file, then add /c, like this:
Db2cmd /c batch.bat
Here's a link to the ibm's manual page for db2cmd.
http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ib
m.db2.udb.doc/core/r0002036.htm
Hope this helps,
Greig Wise
-----Original Message-----
From: Auguy BILOLO
[mailto:db2udbdba-ezmlmshield-x53599435.[Email address protected]
Sent: Thursday, December 30, 2004 10:00 AM
To: LazyDBA Discussion
Subject: How to launch a batch file ?
Hello,
Could you please tll me how to create and launch a DB2 batch file. I
have a
batch file which contains a db2 command as :
db2 get snapshot for dynamic sql on mcmprd1 > out3.txt
When I execute the batch file by right-click and Open it, no thing is
executing
and an error message is showing up.
What I'm doing wrong ? I m limited to launch this file as db2 -f
batch.bat from
the command line processor ?
Augustin
----------------------------------------------------------------
This message was sent using XNETSECURE.COM, the secure Internet
Messaging
System.
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page