how to generate sequence

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
vasu77
Participant
Posts: 10
Joined: Mon Jan 19, 2004 11:39 am

how to generate sequence

Post by vasu77 »

hi all
i am having a sequential file and it contains header and body.the header should go in one table and body should go in another table.but the problem is that while inserting in to the tables i have to create a new column in both the tables which contains a number and should be in sequence when ever it inserts.how do u do this in px and one more thing is the header is a single row and body contains muntiple rows .its like a parent and child relationship.
thanks in advance
vasu
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

DataStage comes with some sample routines for allocating sequence numbers, have a look at the SDK - KeyMgt folder in the routines section in the Manager. Also release 7.0.1 has improved handling of these keys in parallel jobs:
Added Functionality and Usability Improvements
A new parallel Surrogate Key Generator stage is available in DataStage Enterprise Edition. This will assist in data warehouse projects creating dimensional data.
You might be able to use this new stage to create the sequence number.
Post Reply