If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Windows Command via Script Centre

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-10-05, 06:05
T J Wadey T J Wadey is offline
Registered User
 
Join Date: Jan 2003
Location: UK
Posts: 7
Exclamation Windows Command via Script Centre

Hi All.

Can someone please let me know if its possible to run a Windows \ DOS Command via a batch job created in the Script Centre?

any examples would be usefull.

Many Thanks
Reply With Quote
  #2 (permalink)  
Old 03-10-05, 06:43
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
possible ... Select the 'OS Command' option when creating the script in script centre
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 03-10-05, 07:21
JAYANTA_DATTA JAYANTA_DATTA is offline
Registered User
 
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
Enclosed example can help you in this regard:


db2 connect to %1 user %2 using %3
db2 set schema STAGING

echo ==== CREATING TABLES ====
cd DDL
db2 -stvf create_table.ddl
echo Exit code from CREATING TABLES: %ERRORLEVEL%

echo ==== CREATING EVERYTHING ELSE ====
db2 -stvf everything_else.ddl
echo Exit code from CREATING EVERYTHING ELSE: %ERRORLEVEL%

cd ..


Jayanta Datta
Xansa India
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On