@echo off rem *** Start of script for flow *** setlocal set status=0 set scriptfile=C:\temp\SchedulingServer\pcdel090_sasdemo\flow_product\flow_product_09EC000001.bat set statusfile=C:\temp\SchedulingServer\pcdel090_sasdemo\flow_product\flow_product_09EC000001.status rem *** Start of flow *** rem Log flow start message to status file echo Flow flow_product starting >> %statusfile% rem *** Begin Job Event *** rem Update date and time variables to be current for /f "tokens=*" %%a in ('date /t') do set date=%%a for /f "tokens=*" %%a in ('time /t') do set time=%%a rem Log start of job to status file echo. >> %statusfile% echo Beginning execution of job DDE_A5S1HX8R_AL00099D at %date% %time% >> %statusfile% start "" /wait cmd.exe /c "C:\Documents and Settings\fraged\Mes documents\TCS\v9\ConfigSP4\Lev1\SASMain\BatchServer\sasbatch.bat" -log C:\temp\BatchServer\logs/DDE_#Y.#m.#d_#H.#M.#s.log -batch -noterminal -logparm "rollover=session" -sysin SASEnvironment\SASCode\Jobs/DDE.sas rem Log exit code of job to status file set status=%errorlevel% echo job Exit code = %status% >> %statusfile% rem Update date and time variables to be current for /f "tokens=*" %%a in ('date /t') do set date=%%a for /f "tokens=*" %%a in ('time /t') do set time=%%a rem Log completion of job to status file echo Finished execution of job DDE_A5S1HX8R_AL00099D at %date% %time% with status = %status% >> %statusfile% rem *** End Job Event *** :flowexit rem Log exit code of flow to status file echo. >> %statusfile% echo flow Exit code = %status% >> %statusfile% rem Log flow finished message to status file echo. >> %statusfile% echo Flow flow_product finished >> %statusfile% rem Log flow separator line to status file echo. >> %statusfile% echo ***************************** FLOW SEPARATOR LINE ***************************** >> %statusfile% echo. >> %statusfile% endlocal rem *** End of script for flow ***