Page 1 of 1

Posted: Wed Feb 04, 2009 9:02 pm
by ray.wurlod
Add a new column to your input. This column has the same value, say "X", in every row. A Column Generator stage would be ideal.

Create a Data Set containing pairs of values, "X" and a value, for example X,100; X,125; X,150 and so on up to the largest possible value. Permit duplicates.

Effect a join between this data set and your input stream.

Filter the result on Amt <= Value.

Re: Looping Construct in datastage

Posted: Wed Feb 04, 2009 9:13 pm
by nishadkapadia
There could be more simpler & smarter solutions suggested further .
One of the naive possibilities include 2-3 jobs.

Counter Initialization based on keys could be 1 DS job or could be merged.
Subsequently,have a single DS job which does this validation , sorted on ascending counter for the keys.
Have this DS Job created in step 2 be executed through sequencer based on the check whether the Indicator is N for any records sorted on Keys and counter.

Partitioning will still be on keys and counter, with same sorting option

Hoping this helps.

Posted: Thu Feb 05, 2009 6:21 am
by Mike
Maybe... but Ray's solution is pretty darn simple already.

Mike

Posted: Thu Feb 05, 2009 6:35 am
by Sainath.Srinivasan
Or build an operator