Page 1 of 1

control the sending of records to target

Posted: Mon Dec 17, 2007 4:36 am
by iamnagus
i have one requirement that is:

i have one input file that contains 100 records start from
serial_number 1-100.

i have another input file that contains two columns named as: Start_number & End_number and it has values as 10,50 respectively. by
using these values(10,50) i want to send the input records starting from 10th record to 50th record the out put.

Can any one has the idea about this requirement.

Plh help me.. about the procedure to do...

Posted: Mon Dec 17, 2007 4:45 am
by ArndW
Does your second file, with the "10" and "50" values, have only one row?

Posted: Mon Dec 17, 2007 7:16 am
by chulett
Create a hashed file with two hard-coded key records from the second file, one for the start and one for the end value. Look them up and constrain your first file's passage through the transformer based on those two values.

Posted: Mon Dec 17, 2007 8:41 am
by Minhajuddin
or

Create two job parameters "start_value" and "end_value" in your job and use this in the constraint of the transformer.

Populate the start_value and end_value job parameters in the sequence from a basic_routine which reads the file which has these two values.

Posted: Mon Dec 17, 2007 9:14 am
by chulett
Sure, but keep in mind the experience level. Adding a sequence job and coding a BASIC routine into the mix adds complexity, typically beyond what people have done before. Always a first time, I know, but this really can be solved rather simply inside the existing job with a hashed file and two reference lookups. Plus a 'build' link using a Sequential File stage to populate it.

Granted, you look the same value up over and over, but so? Use the cache, Luke. :wink:

Posted: Mon Dec 17, 2007 1:05 pm
by Minhajuddin
chulett wrote: Plus a 'build' link using a Sequential File stage to populate it.

Granted, you look the same value up over and over, but so? Use the cache, Luke. :wink:
I guess I need to get more experience to understand what you just said :(