I need a way to keep my current DB2 CLP window open so i can execute the following commands in the same window.

I execute the following commands using Create Process:

catalogTcpip.Format(_T("DB2CMD.exe -c -w -i db2 catalog tcpip node CNS remote %s server 1527"), serverName);
catalogDummy.Format(_T("DB2CMD.exe -c -w -i db2 catalog db dummy at node CNS authentication server"));
connectDummy.Format(_T("DB2CMD.exe -c -w -i db2 connect to dummy user app using app"));
createDb.Format(_T("DB2CMD.exe -c -w -i db2 call CREATE_DB('%s')"), dbName);
My problem is that after it goes and connects to the dummy database and then i call a function from my stored procedure called "Create_DB", it says that the connection does not exist.

I need a way so that the DB2CLP does not go away after it connects to the database and keeps the connection for the commands that i run after it.

Please let me know what I can do here.