Command Stage by itself

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dylsing
Participant
Posts: 35
Joined: Thu May 04, 2006 9:56 pm

Command Stage by itself

Post 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.
Klaus Schaefer
Participant
Posts: 94
Joined: Wed May 08, 2002 8:44 am
Location: Germany
Contact:

Re: Command Stage by itself

Post by Klaus Schaefer »

Better use command activity in job sequencer for this.

Klaus
dylsing
Participant
Posts: 35
Joined: Thu May 04, 2006 9:56 pm

Re: Command Stage by itself

Post 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.
Klaus Schaefer
Participant
Posts: 94
Joined: Wed May 08, 2002 8:44 am
Location: Germany
Contact:

Re: Command Stage by itself

Post 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
ameyvaidya
Charter Member
Charter Member
Posts: 166
Joined: Wed Mar 16, 2005 6:52 am
Location: Mumbai, India

Post 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.
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
dylsing
Participant
Posts: 35
Joined: Thu May 04, 2006 9:56 pm

Post 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. :)
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Command Stage by itself

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

"You can never have too many knives" -- Logan Nine Fingers
Post Reply