SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Job Iterations

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Job Iterations
Author Message
laiko



Joined: 11 Feb 2010
Posts: 43
Country: India

Post Job Iterations Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7952

Post Reply with quote
Same here. Please specify your environment.
Fri Feb 12, 2010 9:42 am View user's profile Send private message
laiko



Joined: 11 Feb 2010
Posts: 43
Country: India

Post Reply with quote
We're using linux and Datastage for the jobs; MP Version
Fri Feb 12, 2010 10:01 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7952

Post Reply with quote
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 View user's profile Send private message
laiko



Joined: 11 Feb 2010
Posts: 43
Country: India

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7952

Post Reply with quote
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

Code:
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 View user's profile Send private message
laiko



Joined: 11 Feb 2010
Posts: 43
Country: India

Post Reply with quote
It works.. thank you.
Wed Feb 17, 2010 4:39 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.