 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
laiko
Joined: 11 Feb 2010 Posts: 43 Country: India |
|
Job Iterations |
|
I have a job that accepts a parameter. The parameter is dynamic in such a way that it is read from a database table. So if the table has 5 records, the job should iterate 5x, that is, once for each record in the table as its parameter. Please help.
|
|
Fri Feb 12, 2010 7:13 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7952
|
|
|
|
Same here. Please specify your environment.
|
|
Fri Feb 12, 2010 9:42 am |
|
 |
laiko
Joined: 11 Feb 2010 Posts: 43 Country: India |
|
|
|
We're using linux and Datastage for the jobs; MP Version
|
|
Fri Feb 12, 2010 10:01 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7952
|
|
|
|
What's Datastage?
Just to be sure. Are you running 24x7 Scheduler Multi-platform Edition? If yes, which version?
|
|
Fri Feb 12, 2010 10:13 am |
|
 |
laiko
Joined: 11 Feb 2010 Posts: 43 Country: India |
|
|
|
DataStage is an ETL tool.. We're using the MP trial version, we need to test if it is possible to use 24x7 in all the types of jobs we have before purchasing.
|
|
Fri Feb 12, 2010 11:07 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7952
|
|
|
|
I suggest using a JavaScript job for this purpose. Start with setting up a database connection profile for your database. Create a job of script type. For the script flavor choose JavaScript. In the job script, use the following logic
 |
 |
Database.connect("profile name here");
var results = Databse.retrieve("SELECT column_name FROM my_table");
Database.disconnect();
var values = results.split("\r\n");
var i;
for( i = 0; i < values.length - 1; i++)
{
// do here something with each value
} |
For more details on each script command and examples please see 24x7 JavaScript manual.
|
|
Fri Feb 12, 2010 11:34 am |
|
 |
laiko
Joined: 11 Feb 2010 Posts: 43 Country: India |
|
|
|
It works.. thank you.
|
|
Wed Feb 17, 2010 4:39 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|