Loop Activity- Return status of each loop
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 13
- Joined: Fri Jun 22, 2007 1:29 am
- Location: Perth
Loop Activity- Return status of each loop
Hi,
I want to capture the user status of same job executed in loop with different parameters.
Here is my scenario
Job Seq:
Start Loop Activity(For loop i=1 to 4) ->Job Activity->End Loop Activity.
I want user status of each job activity run so that I can use it after End loop activity.I want to avoid dumping the user status into file in each loop run and using it later.Can we store the user status into a varialbe, concatenate it every time in loop and use it after End loop.
Thanks
I want to capture the user status of same job executed in loop with different parameters.
Here is my scenario
Job Seq:
Start Loop Activity(For loop i=1 to 4) ->Job Activity->End Loop Activity.
I want user status of each job activity run so that I can use it after End loop activity.I want to avoid dumping the user status into file in each loop run and using it later.Can we store the user status into a varialbe, concatenate it every time in loop and use it after End loop.
Thanks
Lovesh Patni
There's no concept of a globally scoped variable in Sequence jobs you can update while the job runs. You may be able to build another job that takes in your new UserStatus value and appends it to its current UserStatus, thus concatenating them there but I'm not sure a job can query its own UserStatus value. Worth a shot.
That or just go with the 'write it out to a file' solution.![Wink :wink:](./images/smilies/icon_wink.gif)
That or just go with the 'write it out to a file' solution.
![Wink :wink:](./images/smilies/icon_wink.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 425
- Joined: Sat Nov 19, 2005 9:26 am
- Location: New York City
- Contact:
This might work:
Start Loop Activity(For loop i=1 to 4) ->Job Activity->UserVariable -->End Loop Activity.
I guess that you want to have two User Variables to keep the previous value of the job status
Start Loop Activity(For loop i=1 to 4) ->Job Activity->UserVariable -->End Loop Activity.
I guess that you want to have two User Variables to keep the previous value of the job status
Julio Rodriguez
ETL Developer by choice
"Sure we have lots of reasons for being rude - But no excuses
ETL Developer by choice
"Sure we have lots of reasons for being rude - But no excuses
-
- Participant
- Posts: 246
- Joined: Mon Jun 30, 2008 3:22 am
- Location: New York
- Contact:
-
- Premium Member
- Posts: 13
- Joined: Fri Jun 22, 2007 1:29 am
- Location: Perth
If you go that route, make sure you initialize / empty / clear the sequential file before you hit the loop as inside the loop you'll want to append to the file. That or have your mechanism be smart enough to overwrite on the first iteration and append after that.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 13
- Joined: Fri Jun 22, 2007 1:29 am
- Location: Perth