running a series of scripts (ddl/dml) from job sequencer
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 88
- Joined: Tue Nov 28, 2006 9:33 pm
running a series of scripts (ddl/dml) from job sequencer
A series of scripts (ddl/dml) need to be run through the job sequencer.
the 1st script will be run with 5 different input values and then the 2nd script with the different set of input values and so on. What will be the best design for this.
the 1st script will be run with 5 different input values and then the 2nd script with the different set of input values and so on. What will be the best design for this.
-
- Participant
- Posts: 88
- Joined: Tue Nov 28, 2006 9:33 pm
They need a good... well, nevermind what they need.
Create a standard routine that executes shell scripts. Then a Sequence job with a series of Routine Activity stages can run them. Or code a series of DSExecute calls into the Job Control tab of a Server job and run that.
Or push back and tell 'them' that just because you've got a shiny new DataStage hammer, not every problem is suddenly a nail.
Create a standard routine that executes shell scripts. Then a Sequence job with a series of Routine Activity stages can run them. Or code a series of DSExecute calls into the Job Control tab of a Server job and run that.
Or push back and tell 'them' that just because you've got a shiny new DataStage hammer, not every problem is suddenly a nail.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If they insist upon DataStage for control, why do they insist upon shell scripts? Why not have DataStage do the whole thing? After all, they've paid the money!
It is sometimes necessary to push back, particularly when what "they" want can not be intelligently justified. Please be advised by a couple of very experienced DataStage practitioners.
As to your original questions, what's wrong with sufficient Execute Command activities in the job sequence? The values can be passed to the shell scripts either as command line arguments (retrieved from $1, $2 and so on) or as environment variable values.
It is sometimes necessary to push back, particularly when what "they" want can not be intelligently justified. Please be advised by a couple of very experienced DataStage practitioners.
As to your original questions, what's wrong with sufficient Execute Command activities in the job sequence? The values can be passed to the shell scripts either as command line arguments (retrieved from $1, $2 and so on) or as environment variable values.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 88
- Joined: Tue Nov 28, 2006 9:33 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
They spent such a huge sum on a graphical tool so that they could paste scripts into it?!! Please advise names of persons who make decisions and persons who sign checks. Urgent requirement!!!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 88
- Joined: Tue Nov 28, 2006 9:33 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This
If you have chosen not to implement it, then of course it hasn't helped you!
is a solution.ray.wurlod wrote:As to your original questions, what's wrong with sufficient Execute Command activities in the job sequence? The values can be passed to the shell scripts either as command line arguments (retrieved from $1, $2 and so on) or as environment variable values.
If you have chosen not to implement it, then of course it hasn't helped you!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
These
also were solutions offered to you.chulett wrote:Create a standard routine that executes shell scripts. Then a Sequence job with a series of Routine Activity stages can run them. Or code a series of DSExecute calls into the Job Control tab of a Server job and run that.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
The solutions given to you, are some of the best available ways you can implement your requirement using datastage.kishoreramachandran wrote:none of the replies have helped me so far
Have you tried to implement them?
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
-
- Participant
- Posts: 88
- Joined: Tue Nov 28, 2006 9:33 pm
You build a complete 'command string', parameters and all, and pass that to DSExecute for it to run. We can't just 'give you the command' as each would be different. Use the concatenation operator - the colon (:) - and put together all the same parts you would put on the command line if you ran the script by hand.
For example, let's say you wanted to run script '/user/fred/scripts/get_gone' and you needed to pass it the current date. From the command line you might type:
For DSExecute you would build the same string, but use a variable or job parameter for the current date:
Then you would use the resulting CmdString in your DSExecute call.
For example, let's say you wanted to run script '/user/fred/scripts/get_gone' and you needed to pass it the current date. From the command line you might type:
Code: Select all
/user/fred/scripts/get_gone 2006-12-09
Code: Select all
CmdString = "/user/fred/scripts/get_gone ":DateParameterName
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 88
- Joined: Tue Nov 28, 2006 9:33 pm