Start Loop activity

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
anandkumarm
Premium Member
Premium Member
Posts: 55
Joined: Tue Feb 24, 2004 8:17 am

Start Loop activity

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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,",")
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

:idea:
Convert() is more efficient than Ereplace() for character-by-character conversions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Left that one for you, Ray. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
anandkumarm
Premium Member
Premium Member
Posts: 55
Joined: Tue Feb 24, 2004 8:17 am

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply