group and create sequence..is it possible in DataStage

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Smeitei
Participant
Posts: 28
Joined: Tue Jan 23, 2007 3:14 pm

group and create sequence..is it possible in DataStage

Post by Smeitei »

Scenario.

i have 3 fields coming in as an input say( ID, Name, Age). And i want to introduce one field call "Indicator".

Now if i have duplicate combinationcoming in the output should look like

ID Name Age Indicator
1 Surjit 25 1
1 Surjit 25 2
1 Surjit 25 3
2 XYZ 26 1
2 XYZ 26 2
3 rty 34 1
3 rty 34 2

the output should be such that there should be a generated sequence number for each unique grouping of (ID,Name and Age)

Is it possible in dataStage
Last edited by Smeitei on Wed Feb 14, 2007 8:52 am, edited 1 time in total.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

It is possible.
Very similar situations have been dealt with before. Do a search, if you don't find any, get back.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

What are the inputs?
How the field Indicator is decided upon? ie., how the cound 1,2,3 or 1,2 is decided?
Answer for this vary with respect to your reply.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use sorted (by ID) input and stage variables to detect change and increment/reset sequence number.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Hereis a similar post.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply