Startloop and Endloop activity.

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

Startloop and Endloop activity.

Post by laknar »

i have a job to write the below values to a file(delimited)

Number,Filename
1,File1.txt
2,File2.txt
3,File3.txt

How can i extract and pass the values into Startloop and Endloop activity.
do i need nested loop for this?
Please suggest me.
Regards
LakNar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I don't really know what you want to achieve. Is it a list of the numbers, or a list of the file names, or a list of the pairs, that you wish to pass to the Start Loop activity?

The easiest way is to use an upstream Execute Command activity to read the file (perhaps with filtering), then a user variable to map the line terminators (which by now are probably field marks) to a delimiter character that you will be specifying in the Start Loop activity.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

Post by laknar »

start loop activity will check for single row in a file(delimited)i.e 1,2,3
here i have to pass Number as One Parameter
Filename as Another Parameter.

In the file it contains multiple rows
how can i extract each row(two column Values) one by one in loop
Regards
LakNar
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Post by sachin1 »

i think you need to read a file and in transformation you can do processing.
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

Post by laknar »

my design is

database--------file

from file i have to extract and pass into loop
Regards
LakNar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I gave you a solution. All you need to do is purchase a premium membership so you can read it.

Premium membership is one of the ways that the hosting and bandwidth costs of DSXchange are met. It's not expensive, at less than 30c (Rs 12) per day, and there is an increasing set of benefits.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply