Warning "main_program: Step has no operators"

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
tkbharani
Premium Member
Premium Member
Posts: 71
Joined: Wed Dec 27, 2006 8:12 am
Location: Sydney

Warning "main_program: Step has no operators"

Post 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.
Thanks, BK
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's not possible in a parallel job (without adding stages). Prefer a job sequence with a single Execute Command activity.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
tkbharani
Premium Member
Premium Member
Posts: 71
Joined: Wed Dec 27, 2006 8:12 am
Location: Sydney

Post by tkbharani »

thanks Ray.
But is it good to use Message Handlers and make this warning as informational.
Thanks, BK
OddJob
Participant
Posts: 163
Joined: Tue Feb 28, 2006 5:00 am
Location: Sheffield, UK

Post 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.
Post Reply