control the sending of records to target

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
iamnagus
Participant
Posts: 48
Joined: Wed Sep 29, 2004 1:16 am

control the sending of records to target

Post 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...
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Does your second file, with the "10" and "50" values, have only one row?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

"You can never have too many knives" -- Logan Nine Fingers
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

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

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

"You can never have too many knives" -- Logan Nine Fingers
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post 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 :(
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
Post Reply