hi All,
There is a requirement in project is that we need to implement the following in two ways the same code as descriped
1.The job1 will give me a output file with two columns Id and Name
2. I need to use job1 file output to the job 2 as parameter( Id and Name)
What job2 will do is that it will have the SQL query where the parameter two will be used in the where clause.
And the output of this job will give Parameter of job1 and the required columns from SQL
So please suggest how to implement , i have got the solution from the experts need help on how to implement.
Or else let me know if any alternate solution is there to implement for this?
As i am new to datastage dont know how to implement the below task
A sequence will first call Job1. And then a DS routine is called, which will read the file, and call Job2 with two parameters. This routine will looop through the file, for each line it will call the job2. This solution can be little difficult and complicated.
Second approach could be through UNIX script.
After Job1 is completed, a UNIX script is triggered.
This script will read the file, and for each line, it will call Datastage Job2 with necessary parameter. Its possible to call Datastage Job from a UNIX script.
Please let me know how to trigger the unix script in the job.
So please suggest how to implement.
It will be really great full
Routine or Unix Script
Moderators: chulett, rschirm, roy
I don't see a problem with option 1, nor a need for any 'looping'. A routine can be used to retrieve the values and called twice in the Sequence, once for each value. Or a UserVariables stage could pull both values, then either could pass them as job parameters to Job2. Neither difficult nor complicated in my book.
-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:
thanks for your reply.chulett wrote:I don't see a problem with option 1, nor a need for any 'looping'. A routine can be used to retrieve the values and called twice in the Sequence, once for each value. Or a UserVariables stage could pu ...
Can anyone guide me in steps how to follow
It will be really helpfull as i am new to datastage, so finding difficult to start off
viewtopic.php?t=126249ray.wurlod wrote:I'm sure I answered that recently in a different thread. Too busy to search for it at the moment. Solution involved use of Job1 user status area.
Also suggest you search the forums for "setuserstatus" a function that helps with leveraging the USERSTATUS area Ray mentions.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers