Page 1 of 1

Start Loop activity

Posted: Fri Nov 16, 2007 2:31 pm
by anandkumarm
HI
I have a problem with the start loop activity.
I have a file on the unix box which has values
aaa
bbb
ccc
ddd
eee

the format of the file cant be changed to a comma seperated or anything else....I want these values to be passed into my job activity after the start loop one after the other
my job lookd like this

start loop-->jobactivity-->endloop

Thanks

Posted: Fri Nov 16, 2007 2:38 pm
by chulett
It would help if you actually asked a question. :?

There's no need to 'change the file', have your process that reads in those values and sets them in the Start Loop change the delimiter. For example, perhaps something like this would help:

EReplace(YourList,@FM,",")

Posted: Fri Nov 16, 2007 4:28 pm
by ray.wurlod
:idea:
Convert() is more efficient than Ereplace() for character-by-character conversions.

Posted: Fri Nov 16, 2007 4:30 pm
by chulett
Left that one for you, Ray. :wink:

Posted: Fri Nov 16, 2007 5:01 pm
by anandkumarm
chulett wrote:It would help if you actually asked a question. :?

There's no need to 'change the file', have your process that reads in those values and sets them in the Start Loop change the delimiter. For example, perhaps something like this would help:

EReplace(YourList,@FM,",")
Thank you for the Respose...

I want the Start loop to directly read from the Text file and take the values from the text file and pass it to the JobActivity that follows the Start loop
Can I specify the file directly ???

Also I got a work around my problem by using an execute command stage that takes the values from the file and appending comma in between the values.
exec cmd: paste delimiter,filename

assaign the value to a user variable stage

and then pass that value to the start loop.

I am still curious if I can do the same thing with out actually using the exec cmd and the user variable stage...
Can you tell me if there is any way that I can specify in the start loop, the file from which it can directly read the values and pass them to the job

Thanks

Posted: Fri Nov 16, 2007 5:21 pm
by chulett
anandkumarm wrote:I am still curious if I can do the same thing with out actually using the exec cmd and the user variable stage.
Nope, what you did is exactly what you should have done and is the correct solution in this case.