Hi,
Could some one help me with the issue as follow:
I have used a startloop activity to loop each date I specified in the iteration list to call a server job to insert a blank record base on the date from the list. This worked fine when I have a list like this (2008-4-16,2008-4-17,2008-4-18) but it failed when I have an empty list.
What I think is that it should not aborted if there was no item in the list or I may missing some coding here.
Thanks alot.
JN
StartLoop Activity fail when I have an empty iteration list
Moderators: chulett, rschirm, roy
Thanks, So you are saying that I should have a nested condition activity where I will set the condition in the expression under the Trigger tab that if the list is empty then don't run the startloop and if there is something in the list then run the startloop. Right?
If so, could you show me an example?
I have a file under UNIX that contains one line (eg: 2008-4-16, 2008-4-17, 2008-4-18 ) these are the number of items in the list I called for inputing to the startloop
THanks alot
If so, could you show me an example?
I have a file under UNIX that contains one line (eg: 2008-4-16, 2008-4-17, 2008-4-18 ) these are the number of items in the list I called for inputing to the startloop
THanks alot
you will need to have 1 default value populated in the file that supplies the list like 'XXXX-X-YY', and in the nested condition branch the execution to a different sequence if StartLoop.CounterValue = ''XXXX-X-YY'' , alternatively , you can load the list to an user variable activity and use an If then Else derivation to supply a value to the start loop list, you would process the list inthe user varable activity ( if len(command.output) = 0 then ''XXXX-X-YY' else command.output), where command would be like cat <filename> , subsequently use the value of user variable as the input to your list loop.. its up to you now
HTH
Thanks
Ramesh
HTH
Thanks
Ramesh
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
As suggested, a Nested Condition prior to the Start Loop activity is an efficient technique. Don't even enter the Start Loop activity unless the length of the list is non-zero.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.