Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
FWIW, here's an undocumented method to execute or not execute steps in a JOB. I use this in many disaster recovery JOB's, which have many steps which I may want to execute or not execute.
Using 1's and 0's is akin to boolean logic (1=ON, 0=OFF).
// SET RUNSTP1=1
// SET RUNSTP2=0
// IF &RUNSTP1=1 THEN
//* THE STEP WILL RUN, VARIABLE RUNSTP1 RESOLVES TO A 1
// IF &RUNSTP2=1 THEN
//* THE STEP WILL NOT RUN, VARIABLE RUNSTP2 RESOLVES TO A 0
Unless you explicitly name each step of the proc by using the appropriate two-level identifier, what you want to to cannot be done. You might want to investigate using your site's job scheduler to schedule three separate jobs, in which case the only condition codes to matter will be the ones in the current job.
it can be done the following way. you have to add the stepname as parameter to the proc.