RND on Sequence

Hi everybody,

I have a doubt on, where the current value of the sequence get stored? I have searched in _sequence (Hidden Table), but still i couldnt get a solution to my question...

Can anyone help me out??? :confused:
 
Sequences are not stored in a table. Therefore they are independent of transactions. It's just a number which increments. The only way to get the current value of the sequence is using the current-value function.
Or in 10.1A and higher the dynamic-current-value function.

Regards,

Casper.
 
Thank u Casper...

Consider this criteria,
I do have a student table with 15 records that has used a sequence "Stu-no" initial value as 100.

So now the current value of sequence will be 115 and when i am using it in another table the value of Next-Value(Stu-no) will be 116 and not 115, so where is this 115 get stored...

Hope so u could understand the situation.....
 
I don't think I understand exactly what you mean.
But sequences are stored in a databaseblock which just holds sequences. Sequences are database objects which hold increment counters. The _sequence table holds the characteristics of the defined sequences. The block itself holds the current-values. There is no other way then using the functions I told to get these values. (well maybe write some C program if you knew in what location the sequences where stored).

from the documentation:
Sequences are objects, like fields, that you can create and maintain in any OpenEdge database. Unlike fields, sequences reside in a separate database block independent of application tables

furthermore: sequences don't participate in transactions. So if any undo takes place in a transaction, the sequence value will not be undone.

I don't know if this helps, otherwise you must try to be more specific.

What do you want to do?

Casper.
 
Hi,

Hope so we r right on a single track...
U have told that "Current value" is available in some database block, which is that database block???

U said that _Sequence is a table that holds the characteristics of the defined sequences... Like wise can u help me out to find in which database block does the current value of sequence get stored...


Or in particular, i wil put in this way, "From where does the next value being fetched for a sequence, so u need the current value which is being stored somewhere; that is what my question is WHERE???"

Hope so u could get me...
 
Hope so we r right on a single track...

I begin to get a feeling we are not :-)
What do you mean with what block?
What do you try to acomplish?
Waht do you want to do, that you can't use the Progress functions?
In Progress the current-values can only be retrieved with the already mentioned functions.
So if you want a physical position within the database, then I suspect you have to look for that in the database masterblock, but I'm not sure if that is correct.
If you really need this detailed information, then maybe posting this question at peg@peg.com will give you more answers.

Casper.
 
Hi,

S thats what i am asking u... Where wil it stored physically.
I know that it could be retrived from function, but i like to know how they have written the code for that function...

Also from which place is the function reading the value of the current value of the sequence???

:confused:

Also What do u mean by database masterblock???
 
For information regarding the MasterBlock:

ftp://ftp.progress-tech.ru/incoming/George/Scripts/dbinfo.sh

Sequences values are stored at some offset somewhere in the db structure. It might be in the MasterBlock but I seem to recall that there is a SequenceBlock somewhere. But really, this isn't a path that you want to pursue for anything other than idle curiosity. If you really need to know track down Rich Banville at Exchange and ask him. I'm sure he'll tell you everything you want to know.
 
Thanks a lot...

The link which u sent me was very very useful, thanks a lot... I am also searching for the same and if u find the exact place where it is stored tel me.
 
You make me very curious and since we answered some of your questions, maybe you can answer the question I already asked, that being: What are you trying to acomplish?

Casper

(BTW dbkey of sequence block is in the masterblock, and no details for masterblock for OE10 are present in the link Tom Sent you).
 
Hi,

I don know anything about that, now only i am trying to understand about these things. I am new to Progress but i know other langs like JAVA, C, C++ and so on...

I need to know about the masterblock and such concepts... I don know where to get these informations, can u help me out... Help me where xactly the value is being placed or even show me the right path for that. I wil do it. I want to know each and every concepts indepth.

Plzzzzzzzzzzzz...
 
In my experience is the best way to start learning stuff is by first learning the basics and then the details. Sometimes deeper understanding makes things clearer and sometimes the only benefit you get from knowing something is the satisfaction of your curiousity.

For instance, the reason why you can't find anything on the exact location of the sequences is because nobody needs to know this, since there are functions and methods which have this understanding and do the work for you. There is absolutley no use for such knowledge. (At least I can't think of any, that's why I asked you what you try to accomplish.).

If you program in C is it important to know what the if statement exactly does on a bit level to be able to use it?

Hope you understand what I mean...

Casper.
 
Thank u very much...

I do study C bit by bit, i am more interested in System level programming... So i like to know how the compiler of each and every language... Its k... I will be very curious to know complete details that i take into considerations. If u can tel me the right path to approach the same...
Had a nice talk with u and also want to knoe sone other information, if u r ready to help me out jus give me info for the following ques,

What is the memory size allocated for the datatypes that r available in Progress???

Thanks a lot.
 
Please don't ask double questions. You already asked this in another thread, Replies wil appear there.....

Casper.
 
Back
Top