Windows – Prostrct create causes windows batch file to exit

progress-databasescriptingwindows

I have a daily job to restore a database from last night's back up before doing other things to it and moving on. I'm trying to automate this with a script, but when I get to the following command the batch file exits – it won't run anything after this command:

prostrct create repldb rdb10.st -blocksize 8192 >> "%logfilename%" 2>&1

So if I put another command on the very next line such as echo boo! then nothing appears.

Can anyone advise on how I can get my batch to continue after prostrct create?

Best Answer

prostrct is a batch file, so calling it from a batch file will terminate the current batch file.

To get around that you need to call it with a "call" command, like so:

call prostrct -list dbname

or whatever command you want to use.