• I could be wrong, but I think you are missing a few ;

    I think the command should be:

    sqlcmd -S %_var1% -d %_var2% -Q "DECLARE @status varchar(100); exec dbo.sp_RunSQLAgentJob @job_name = 'Process OpenToBuyWhatIfAnalysis', @job_stat_desc = @status OUTPUT; PRINT @status;"

    NOTE the ; after OUTPUT and after varchar(100).

    I could be mistaken, but I am pretty sure you need some form of statement terminators in there.

    failing that, what are the values of %_var1% and %_var2%? Maybe those have some unhappy values in them?

    Can you run that single line outside of the batch file without errors?

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.