• If you mean in a job as in TSQL that you execute in Managment studio, why don't you set SQLCMD mode on by default?

    tools ->options -> Query Execution -> Enable 'by default, open new queries in SQLCMD mode'