Greetings for the day.
This is about windows batch files, my batch file will call couple of batch files internally, we have 2 conditions like error and success conditions, if nay batch files get fails, that should be go to error condition if all batch are doing well it will go to success conditions, but we got new requirement that is if few batch files fails it should not go to the error condition, those batch files will just go to exit to another condition(3rd condition ) could you please tell us how to use the condition to go to 3rd condition
we have used below code please find that
internally batch file code
@Call :DispMsg "*========== %bProcNm% Successful Exit ==========" %DATE% %TIME%
@dir \ > Nul 2>&1
@Call :DispMsg "*=*=*=*=*=*=* %bProcNm% ERROR EXIT !!! =*=*=*=*=*=*"
@if not .%1 == .nopause pause
main batch file code
@xcopy xxxFFFxxxFFF > nul 2>&1
In above internal code will go to either error or success always and main program will follow the same accordingly.
but here when the internal batch file code get error it should not use the error condition in the main batch file instead of this it should use new condition(3rd condition)----- this is my requirement
could you please give your suggestions on this
this is programming.. if you bat file calls other programs it has to check the error code then exit accordingly
if that particular exit code is NOT to trigger a failure then you either need to use max_exit_success or success_codes attribute in your jil.
"This is about windows batch files, my batch file will call couple of batch files internally,"
Instead can you have a job for each of the internal batch files and eliminate the calls from the main batch file?
Error coding is handled by job stream defined in Workload Automation Manager.
Less programming and more visibility.
What is type is your Workload Automation Manager?