Unanswered: Batch file stops execution after the 'db2cmd -i -w db2clpsetcp' is issued.
I am facing issues when running the set environments command followed by the db2 commands in the batch file.
The batch file looks like this:
db2cmd -i -w db2clpsetcp
db2 CREATE DATABASE dbname
db2 -tvf db2look.sql
db2move dbname load
db2 connect to dbname user username using password
db2 set integrity for dbname.tablename1 immediate checked
upon running the batch file, line 1 executes and the cmd window refreshes to set environment (kind of clear screen).
But the line#2 and onwards does not execute.
If i type 'exit' the environment is exited and the rest part of batch executes, with environment not set error.
However, i currently have a workaround for this, I support the script with a readme stating the user to open the cmd and type this (db2cmd -i -w db2clpsetcp) command , once the environments are set, i ask to run the script.