Page 1 of 1

Arguments in Job sequence Start Loop Activity

Posted: Fri Nov 16, 2007 1:08 am
by pavan31081980
Hi All,

I need to run the jobs in multiple times,I designed the Job sequence for a particular job and added Start & End loop activity between the Job activity..It's working fine.

now i would like to know ;in runtime...how we can pass the START LOOP Activity 'FROM' & 'To' value.while running job ,Job should take the value from the database table or file and get the counts how many times jobs needs to run and run this job.

Please let me know ...ASAP

Thanks in advance.

Regards,
Durai

Posted: Fri Nov 16, 2007 7:58 am
by chulett
And here we were, doing just fine up until you said this:

Please let me know ...ASAP

[sigh]

:!: Please try to avoid demands in your posts, everyone here is posting when and how often they can or care to. Demand 'ASAP' from your Support Provider, you are paying them for that service after all.

What precisely is your question? I'm not aware of any way to pull any hard-coded From and To values from the Start Loop stage, only the current loop $Counter value. You can, however, use job parameters for those values and then use those same job parameters in any job that needs to know what they were.

Re: Arguments in Job sequence Start Loop Activity

Posted: Mon Nov 19, 2007 6:40 am
by sachin1
hello dear,

for your requirement, you need command activity stage, which will output start loop and end loop value concatenated.
just for example you create one .bat file with echo command.

get the output from command activity stage and put it in UserVariables_Activity stage creating one/two variables as per your requirement(use OCONV as required).

use these UserVariables in startloop stage.

it works fine just try.

job design as follows:

Execute_Command ------>UserVariables_Activity---->startloop---->Job_Activity---->EndLoop-->startloop

Posted: Mon Nov 19, 2007 7:35 am
by chulett
Use the UserVariables stage for dynamic values, ones that change from run to run. For this, simple Job Parameters will work fine. Unless, of course, they really need to be dynamic. :wink:

Posted: Mon Nov 19, 2007 7:41 am
by gateleys
After you read the (number of iterations for loop) value from Database, store it in a hashed file. Now, in the job sequence, read the hashed file value (may be using the UtilityHashLookup via a RoutineActivity) and pass it to the Counter value of the StartLoop stage. Note: Use a dummy value (say, '1' as the value for the hashed file key coloumn).

Posted: Mon Nov 19, 2007 9:21 am
by sachin1
yes job parameter will do if you are executing through batch runtime value change will be captured in sequencer.