I have this step in sql server job

AAA.bat content is this
call BBB.bat
call CCC.bat
BBB.bat and CCC.bat each run ETL packages.
When I run above step it throws error
BBB.bat is not recognized as an internal or external command, operable program or batch file... CCC.bat is not recognized as an internal or external command, operable program or batch file
However, when I replace AAA.bat with either BBB.bat or CCC.bat it works as intended.
Are
BBB.batandCCC.batin the same directory asAAA.bat? You need to set the working directory first. InAAA.batadd the following at the top of the file:Or, call
BBB.batandCCC.batusing their full path.A possibly better solution, depending on your environment and needs, would be to have your job contain two steps, each one calling the appropriate batch file (
BBBorCCC) separately. That way, if you have a failure, its very obvious which batch file had a problem.