Issue with executing a command in parallel
Posted: 16 Jan 2021 04:58
Hi Folks -
I have the following command that executes an Oracle utility:
The utility is java based. What it does is while executing, it creates a log file in the same directory as where the script is executed from and spools lots of information to the log as it processes, some of which I want to capture. The challenge is if the command executes with success, the log is automatically deleted by the utility. If the command fails, the log is not deleted which is good because then I have another process to parse the log.
So basically what I need to do is run the command above and then then somehow copy the log to a temp to preserve it. I don't need to continue to copy the log to temp as it processes as the pertinent information I need is from the first few lines of the log anyway.
I assume I can't use call, right? The challenge with START is that it will proceed with the rest of the script. Any ideas?
I have the following command that executes an Oracle utility:
Code: Select all
CALL C:\path\to\util\utility.bat operation Param1 Param2 Param3 Param4 Param5 Param6 && (
ECHO Successful : Execute Data Load Rule
) || (
ECHO Failed : Execute Data Load Rule
)
So basically what I need to do is run the command above and then then somehow copy the log to a temp to preserve it. I don't need to continue to copy the log to temp as it processes as the pertinent information I need is from the first few lines of the log anyway.
I assume I can't use call, right? The challenge with START is that it will proceed with the rest of the script. Any ideas?