Page 1 of 1

counter needs to be incremented by 1 with exactly 6 digit

Posted: Wed Aug 17, 2005 7:16 am
by pongal
I want to generate a sequence number starts from 000000 and increment by 1 for each load.
for eg:- if source contains 1000 records for first load,
sequence number should start from 000001 and ends at 001000.
for second load, if source contains 2000 records,
then sequence number should start from 001001 and ends at 003000.
is there any readymade function that we can use or do i need to write a code in server routine?

Thanks in advance

Posted: Wed Aug 17, 2005 7:24 am
by ArndW
Pongal,

you could write a function that returns the number of rows processed in the last run of a job, use the DSGetLinkInfo() routine and give it the stage and link name and it can return the number of rows processed. This number can then be used to update either a Hashed file or a table with the new sequence starting number.

Posted: Wed Aug 17, 2005 8:42 am
by pnchowdary
Hi Pongal,

Alternatively, you can always store the number of rows read from source in a sequential file and read the file in a before job routine and populate your sequence number accordingly.

Posted: Wed Aug 17, 2005 9:09 am
by elavenil
Hi Pongal,

You can also store the last seq number for each load and increment from that seq number in the next load.

Regards
Saravanan