Check output of called Script
Posted: 27 May 2021 04:28
Hi All,
We have a batch script, which executes Informatica jobs. This is an existing batch script called "Master_Batch.bat"
I am writing a new batch script, which call above script in loop (for example, call 5 times).
Now the problem is, it runs the master_batch.bat only once and exit the process. When I remove master_batch.bat call from the new script, I can see it iterates 5 times.
Can someone please help how to debug this? I cannot make any change in "Master_Batch.bat" as it is working in production correctly. I just wanted to check why it gets exit after 1st run. With my analysis, the Master_Batch.bat is completing successfully.
Below is code from my new batch script.
Without Master_Batch.bat call, log fle shows 1 2 3 4 5
With Master_Batch.bat call, log file shows only 1
We have a batch script, which executes Informatica jobs. This is an existing batch script called "Master_Batch.bat"
I am writing a new batch script, which call above script in loop (for example, call 5 times).
Now the problem is, it runs the master_batch.bat only once and exit the process. When I remove master_batch.bat call from the new script, I can see it iterates 5 times.
Can someone please help how to debug this? I cannot make any change in "Master_Batch.bat" as it is working in production correctly. I just wanted to check why it gets exit after 1st run. With my analysis, the Master_Batch.bat is completing successfully.
Below is code from my new batch script.
Code: Select all
@ECHO OFF
set loopcount=1
:loop
echo %loopcount% >> test.log
Master_Batch.bat DWSE CUSTOMER_DEMAND_FILL
set /a loopcount=loopcount+1
if %loopcount% ==6 exitloop
goto loop
:exitloop
With Master_Batch.bat call, log file shows only 1