Page 1 of 1

Warning "main_program: Step has no operators"

Posted: Mon May 19, 2008 11:43 pm
by tkbharani
Hi
I have many jobs in which I call only unix scripts using ExecuteSh using after_job_subroutine or before_job_subroutine. while running the jobs , its giving an warning as follows

Code: Select all

main_program: Step has no operators
Which is correct,as my job does not have any stages. Is there a way to supress this warning,other than Message Handlers or creating a dummy job. Is there any way to use any environment variables to avoid this. Whichis best way to avoid such warnings.

Posted: Tue May 20, 2008 12:11 am
by ray.wurlod
It's not possible in a parallel job (without adding stages). Prefer a job sequence with a single Execute Command activity.

Posted: Tue May 20, 2008 12:23 am
by chulett
Or use a Server job where you code under the 'Job Control' tab. You've got alot more legroom there for doing more than just the equivalent of ExecSH.

Posted: Tue May 20, 2008 12:24 am
by tkbharani
thanks Ray.
But is it good to use Message Handlers and make this warning as informational.

Posted: Tue May 20, 2008 2:19 am
by OddJob
You could use a message handler to demote the warning to information - this means you'll need to remember to move the handler config file to each of your environments when you deploy code.

Alternatively, put some very basic stages into the job that don't actually do much e.g.

Row Gen -> Copy Stage

Set the row gen to create 0 rows, no output columns, running sequentially.

Set the copy stage to run sequentially (reduces the number of processes created).

I personally prefer to use a Sequence with an Exec Command stage. This allows you to put in some more logging/error trapping if things go wrong.

I only use before/after sub-routines as a last resort because of issues of support and error handling.