Sequence number Generation

Hi,
can any one provide solution for how generate the sequence number. for example i have used in expression "SEQ-"+Numeric.sequence("s1",1,1).toString for generating String sequence like SEQ-1. but its generating random sequence .
Thanks ,
Venkateswarlu.
4 REPLIES
Five Stars

Re: Sequence number Generation

sounds odd. Are you sure it's random?
Are you making multiple references to Numeric.sequence("s1",1,1) and incrementing it where you don't expect?
Also consider that the sequence is static and spans "child" Jobs.

Re: Sequence number Generation

Hi,
Yes sure , Its generating Random number.
Five Stars

Re: Sequence number Generation

I don't believe they can be "random".
The sequence number generation is very simple.
I think you're incrementing it unknowingly.
What are the first 10 keys being generated?
Do you have a multi-threaded Job?
One Star

Re: Sequence number Generation

How to generate Unique batch ID for each batch JOb run? 
Thanks,
Rajitha