Looping
Moderators: chulett, rschirm, roy
Looping
Hello everyone,
I am working on PX 7.1 and need to create a loop to calculate data for one month and then using that data to calulate data for previous month and so forth , thus create a loop such that if in Dec - it should calculate data for 11 times.
eg - using May data to get april data, using that derived april data to get jan march data and then with that derived march data get feb data.
please help me know what are the ways to do recursive actions
Thanks
DS1
I am working on PX 7.1 and need to create a loop to calculate data for one month and then using that data to calulate data for previous month and so forth , thus create a loop such that if in Dec - it should calculate data for 11 times.
eg - using May data to get april data, using that derived april data to get jan march data and then with that derived march data get feb data.
please help me know what are the ways to do recursive actions
Thanks
DS1
Correct me if I am wrong -
From your example - you have May data as the source. You want to process this and come up with the data for April. Then using April's data you want to come up with March data - is that correct?
You can run your Job in a Loop from the job sequence. StartLoop and EndLoop may be two activities that you might want to look at.
From your example - you have May data as the source. You want to process this and come up with the data for April. Then using April's data you want to come up with March data - is that correct?
You can run your Job in a Loop from the job sequence. StartLoop and EndLoop may be two activities that you might want to look at.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
HI
I dont think its a good design to use a loop feature in sequencer to loop for each record. Looping in sequencer is generally used to loop to
different subprocesses not to work on on record in a loop.
Regards
Sreeni
quote="thebird"]
I dont think its a good design to use a loop feature in sequencer to loop for each record. Looping in sequencer is generally used to loop to
different subprocesses not to work on on record in a loop.
Regards
Sreeni
quote="thebird"]
Why would you go for creating a routine, when the same can be achieved easily through the Start Loop and End Loop Activities in the Sequence?[/quote]Sreenivasulu wrote: You need to use the start Loop and end loop features in a routine. I think
the DS Gurus are referring to using a routine to achieve this.
Sreeni,Sreenivasulu wrote:
I dont think its a good design to use a loop feature in sequencer to loop for each record. Looping in sequencer is generally used to loop to
different subprocesses not to work on on record in a loop.
We are not talking about looping through records but a single job being run in a loop.
The requirement here I believe is to run a job multiple times with different set of data each time - the input file for the job being created by the job itself in the previous run (except for the first run ofrcourse).
Aneesh
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
Thanks all of you for replying and helping.
thebird is correct-
''The requirement here I believe is to run a job multiple times with different set of data each time - the input file for the job being created by the job itself in the previous run (except for the first run ofrcourse). '' -
I will research more about start-loop and end-loop stages in sequence.
Please let me know about any specific things that i need to consider or keep in mind while using these stages.
Thanks
DS1
thebird is correct-
''The requirement here I believe is to run a job multiple times with different set of data each time - the input file for the job being created by the job itself in the previous run (except for the first run ofrcourse). '' -
I will research more about start-loop and end-loop stages in sequence.
Please let me know about any specific things that i need to consider or keep in mind while using these stages.
Thanks
DS1
plz elaborate on algorithm & bus rules
Is your raw data living in a database? dataset? flat files?DS1 wrote:create a loop to calculate data for one month and then using that data to calulate data for previous month and so forth , thus create a loop such that if in Dec - it should calculate data for 11 times.
eg - using May data to get april data, using that derived april data to get jan march data and then with that derived march data get feb data.
If it is in a database, there's a good chance you could make a custom query that would do what you need and use that as a datasource.
Am I following your example correctly?
Code: Select all
may = deriveData("may", null ).
april = deriveData( "april", may);
march = deriveData( "march", april );
feb = deriveData("feb", march );
Why doesn't may need a 'starting' value ?
John G.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: