Hello,
I need to loop on a job by setting a parameter from a list of value stored in a sequential file. i.e. I want to launch the job one time for each line of my file.
Can I achieve this using the loop feature in the sequencer ?
Thanks,
Benouche
Looping on a sequential file
Moderators: chulett, rschirm, roy
Sure you can. Have an execute command stage do a cat of the file which has the list in a delimitted format (pre-massage the file if its not in that format). Connect this command stage to start loop and in the list specify #Execute_Command_Stage.$CommandOutput#.
Another way would be to build a server job that reads the sequential file and inside the transformer fire off the routine "UtilityRunJob()". This way a job will be fired the number of times a record comes in.
Another way would be to code this entire thing as a batch job.
Yet another way would be to write a small shell that does this.
Another way would be to build a server job that reads the sequential file and inside the transformer fire off the routine "UtilityRunJob()". This way a job will be fired the number of times a record comes in.
Another way would be to code this entire thing as a batch job.
Yet another way would be to write a small shell that does this.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Read the Total count of rows in seq file using Exe Cmnd
Start a loop (1 to count), read current loop number line from the seq file using UVactivity (Write a routine to read seq file) and pass it as parameter to your Job.
In case of Multi Instance this job call should be a routine which will start an instance of the job with the parameter and runs independently
Start a loop (1 to count), read current loop number line from the seq file using UVactivity (Write a routine to read seq file) and pass it as parameter to your Job.
In case of Multi Instance this job call should be a routine which will start an instance of the job with the parameter and runs independently
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>