If the stage is at the end of a path, it executes the command and passes the incoming data through unaltered. The arrival of the row merely causes the command execution. Command Stage can have only one input and one output link: Input link. Specifies a row of actual data or a single row from a previous instance of Command Stage. You can place a Command Stage midstream or at the end of a job path (with no output link). Apart from Job Activities all other activities within a DataStage job sequence are synchronous. Activities such as executing an external command using the Execute Command stage or calling a subroutine are synchronous. Once the job sequence begins such an activity it cannot continue until the activity has completed. Hi, I need to count the rows in a file, for whenever the rows is 0, then i need to run another job. I use the sequencer job and add execute command to do this. Command = wc -l filename trigger = &commandoutput=0 The problem is, the command output result is = 0 filename so the triggers does not work as the 'file name' comes out as the result as. Jobs containing the Execute Command Activity that executes an example command below. Cd /home/dsadm; ls -1atr.file. head -1 Where the directory /home/dsadm contains a file named file.txt This should return the result as follows: file.txt However, the following result is observed: file.t.t.
Active2 years, 11 months ago
I am considering using RCP to run a generic datastage job, but the initial SQL changes each time it's called. Is there a process in which I can use a User Activity Variable to inject SQL from a text file or something so I can use the same datastage?
I know this Routine can read a file to look up parameters:
But does that mean I just store the SQL in one Single line, even if it's long? Thanks.
arcee123arcee123
60222 gold badges1919 silver badges5151 bronze badges
3 Answers
Why not just have the SQL within the routine itself and propagate parameters?
I have multiple queries within a single routine that does just that (one for source and one for AfterSQL statement)
This is an example and apologies I'm answering this on my mobile!
I've used the multiple encapsulations in the example above, when passing out to a parameter make sure you check the ', ' have either been escaped or are displaying correctly
Again, apologies for the quality but I hope it gives you some ideas!
Dan GriffithsDan Griffiths
You can give this a try
![]()
so if EC activity name is exec_query , then the job parameter will be
![]()
Execute Command Stage In Datastage
balaji karthikbalaji karthik
Applied river morphology pdf. Has you thinked to invoke a shellscript who connect to database and execute the SQL script from the sequential job? You could use sqlplus to connect in the shellscript and read the file with the SQL and use it. To execute the shellscript from the sequential job use a ExecCommand Stage (sh, ./, ..), it depends from the interpreter.
Other way to solve this, depends of the modification degree of your SQL; you could invoke a routine base who handle the parameters and invokes your parallel job.
The principal problem that I think you could have, is the limit of the long of the variable where you could store the parameter.
Tell me what option you choose and I could help you more.
Angel DozaAngel Doza
Execute Command Datastage Example
71911 gold badge1212 silver badges2525 bronze badges
Execute Command In Datastage 10Not the answer you're looking for? Browse other questions tagged datastageinformation-server or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |