Try db2cmd -w -i
See below for more info on the db2cmd parameters. This taken from the DB2
V7.1 Command Reference. Earlier versions of DB2 may have not supported
some of the parameters (not sure though), but you can give them a try.
-------------------------------------------
Command Reference
db2cmd - Open DB2 Command Window
Opens the CLP-enabled DB2 window, and initializes the DB2 command line
environment. Issuing this command is equivalent to clicking on the DB2
Command Window icon.
This command is only available on Windows NT, Windows 95, Windows 98, and
Windows 2000.
Authorization
None
Required Connection
None
Command Syntax
>>-db2cmd----+----+------------------------><
+--c-+
+--w-+
+--i-+
'--t-'
Command Parameters
-c
Execute the command, and then terminate. For example, "db2cmd /c dir"
causes the "dir" command to be invoked in a command window, and then the
command window closes.
-w
Wait until the cmd.exe process ends. For example, "db2cmd /c /w dir"
invokes the "dir" command, and db2cmd.exe does not end until the command
window closes.
-i
Run the command window, sharing the same console and inheriting file
handles. For example, "db2cmd /c /w /i db2 get dbm cfg > myoutput" invokes
cmd.exe to run the db2 command and to wait for its completion. A new
console is not assigned, and stdout is piped to file "myoutput".
-t
Instead of using "DB2 CLP" as the title of the command window, inherit the
title from the invoking window. This is useful if one wants, for example,
to set up an icon with a different title that invokes "db2cmd /t".
Note: All switches must appear before any commands to be executed. For
example: db2cmd /t db2.
Usage Notes
If DB21061E ("Command line environment not initialized.") is returned when
bringing up the CLP-enabled DB2 window, or running CLP commands on Windows
95 or Windows 98, the operating system may be running out of environment
space. Check the config.sys file for the SHELL environment setup parameter,
and increase its value accordingly. For example:
SHELL=C:\COMMAND.COM C:\ /P /E:32768
-------------------------------------------
Patrick Hans - Database Administration
State of Nebraska Department of Roads
Phone: 402.479.3987
E-mail: [EMAIL PROTECTED]
DBird@kemperinsurance.
com To: [EMAIL PROTECTED]
Sent by: cc:
[EMAIL PROTECTED] Subject: DB2EUG: Running DB2
Scripts from a 3rd Party Scheduler
a.best.com
09/20/2001 08:50 AM
Please respond to
db2eug
I am trying run Windows NT DB2 command Scripts from a 3rd Party Scheduler
ESPX Client. This tool allows us to schedule jobs on the mainframe to
create files that are loaded into tables located on windows NT servers.
Is there a way to run DB2 Command Scripts outside the DB2 Command Window
and the UDB Journal.
I can call db2cmd supplying it a batch file to execute, but sense it runs
in another window I cant tell if it finishes correctly. I was also
thinking there may be a way to trigger UDB Journal Pending jobs to run, but
again how can I tell if it worked.
I've looked at the DB2BATCH command, but it seems to be more of a Benchmark
tool.
=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see
http://people.mn.mediaone.net/scottrmcleod
=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod