Generating a number incrementally

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
Nareshkotti
Participant
Posts: 16
Joined: Thu Sep 08, 2011 8:29 am
Location: hyderabad

Generating a number incrementally

Post by Nareshkotti »

Hi All,

My requirement is i will fetch some records using an odbc stage from a table and load in to another, every time i run the job i need to increment a field value.

For ex: i have field say SNO,

Now when i run the job for the first time then SNO should be populated with the value 1 , for the next run the SNO is incremented by 1..........

Can someone help me out......

Thanks in advance......
Naresh
DataStage Developer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Fetch SNO from the target in another stream in your job, increment it and merge or join it into the main flow. Or use a separate job to extract and increment SNO and pass this value to the main job as a parameter.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Nareshkotti
Participant
Posts: 16
Joined: Thu Sep 08, 2011 8:29 am
Location: hyderabad

Post by Nareshkotti »

Thanks!
Naresh
DataStage Developer
Post Reply