Creating more records based on the day count

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
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Creating more records based on the day count

Post by sshettar »

Hi All,


I have this requirement where in i am suppose to create more records than i recieve from the input file.
I have the file which has the ID , StartDT, EndDT , Location
here is a sample data of the file
100 01202010 01302010 XYZ
200 12122009 12312009 ABC
300 02012010 01282010 SGF

Now what i would want to see is for the first record the person with ID = 100 statys in the location XYZ from 01202010 through 01302010 which makes 10 days in total.
now i want to see 10 records for the ID = 100 with the date being incremented for every record and with the same location XYZ.

I'm thinking of using the transformer stage to do the looping , but not been able to succeed.

Any help on how to accomplish this task is highly appreciated

Thanks in advance
Last edited by sshettar on Tue Feb 16, 2010 3:14 pm, edited 1 time in total.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Moderator: please move to server forum

Create a routine to generate the rows as a dynamic array. Return that and replace each dynamic array delimiter character with newline character. Write to a text file then read back from that text file.
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 »

Much like what this FAQ posting discusses. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Or a [sparse] lookup from a calendar set
Post Reply