Hi,
I am having a shell script which gets max(emp_id) from database(oracle) and writes that value into a sequential file.
Now I want to design a job which would run the shell script first and then extract the max(emp_id) from sequential file and that max(emp_id) should be set as job paramater.please help me.thanks in advance,
Regards,
rajarp
running unix script from a job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 14
- Joined: Fri Dec 22, 2006 5:40 am
- Location: Kolkata
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
I can see two ways of doing this: (Both use a *job sequence*)
Write a basic routine which reads the contents of a file and puts the value in a User variable activity or a routine activity and then passes the value stored retrieved in the file to a downstream job.
Use the above logic. But, instead of a basic routine use a unix command and instead of a user variable activity use an Execute command activity.
The last is a bonus one (Works only with server)
You can store the value which you want to pass as a job parameter in the *User status* of a job and then pass it to a downstream job.
Write a basic routine which reads the contents of a file and puts the value in a User variable activity or a routine activity and then passes the value stored retrieved in the file to a downstream job.
Use the above logic. But, instead of a basic routine use a unix command and instead of a user variable activity use an Execute command activity.
The last is a bonus one (Works only with server)
You can store the value which you want to pass as a job parameter in the *User status* of a job and then pass it to a downstream job.
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
Minhajuddin wrote:I can see two ways of doing this: (Both use a *job sequence*)
Write a basic routine which reads the contents of a file and puts the value in a User variable activity or a routine activity and then passes the value stored retrieved in the file to a downstream job.
Use the above logic. But, instead of a basic routine use a unix command and instead of a user variable activity use an Execute command activity.
The last is a bonus one (Works only with server)
You can store the value which you want to pass as a job parameter in the *User status* of a job and then pass it to a downstream job.
hi Minhajuddin and all,
thank you very much for ur patience.but i want to know how to write a routine which will get value from a sequential file and how can i set these extracted value as job parameter.can u please provide me with some sample routines r links from where i can get sample routines.i have searched various sites and forums.but i dint get any.please help me.
thanks in advance,
regards,
rajarp