Page 1 of 1

Command Stage by itself

Posted: Mon Jul 03, 2006 3:43 am
by dylsing
Hi,

I am trying to have a Command Stage by itself without any links so that I can activate this DOS command, which I want to be a job by itself.

If I am correct this is not possible, are there ways that I can have links to or from the Command Stage to stages that do nothing?

Please feel free to correct me if what I want to do does not make sense at all. Thank you.

Re: Command Stage by itself

Posted: Mon Jul 03, 2006 3:56 am
by Klaus Schaefer
Better use command activity in job sequencer for this.

Klaus

Re: Command Stage by itself

Posted: Mon Jul 03, 2006 4:34 am
by dylsing
Klaus Schaefer wrote:Better use command activity in job sequencer for this.

Klaus
I think you mean the Execute Command Sequence, I have tried it but for some reason, it does not accept job parameters that makes up DOS command and will not run properly unless I hardcode the DOS command in it.

Re: Command Stage by itself

Posted: Mon Jul 03, 2006 5:05 am
by Klaus Schaefer
well, yes, that's a known feature....

You may also consider writing a job control job instead and use the DSExecute function. You're then flexible in constructing the DOS command and have it run as an independend job.

Klaus

Posted: Mon Jul 03, 2006 5:54 am
by ameyvaidya
You can use the built in routines provided by DataStage to execute DOS commands (ExecDOS, ExecDOSSilent) if you are using Datastage 7.5 or greater. They will take Job Parameters and activity variables for DOS commands.

Posted: Mon Jul 03, 2006 6:43 am
by DSguru2B
Or you can have a small basic routine, calling the DSExecute() function. You can run your dos command there. Have a routine activity stage call that routine. Connect the routine activity stage to a sequencer. That should work.

Posted: Mon Jul 03, 2006 6:49 am
by dylsing
DSguru2B wrote:Or you can have a small basic routine, calling the DSExecute() function. You can run your dos command there. Have a routine activity stage call that routine. Connect the routine activity stage to a sequencer. That should work.
I have been using Routine Activity Sequence and using the ExecDos to call my DOS commands. Are there any disadvantages as compared to using Command Stage direct?

Thanks guys, I wanted to know whether I have been using the best technique possible. :)

Posted: Mon Jul 03, 2006 7:01 am
by DSguru2B
No, actually, i would have used the command stage myself. But since you were experiencing some problems with it, i suggested an alternative method.

Re: Command Stage by itself

Posted: Mon Jul 03, 2006 7:21 am
by chulett
dylsing wrote:I am trying to have a Command Stage by itself without any links so that I can activate this DOS command, which I want to be a job by itself.

If I am correct this is not possible, are there ways that I can have links to or from the Command Stage to stages that do nothing?
Just for completeness, this is perfectly possible. However, if you want to check the status of the operation, simply hook it to a downstream Sequencer with an appropriate trigger.

As noted, your issue lies elsewhere with the known issue of the stage not accepting job parameters for some silly reason.