View previous topic :: View next topic |
Author |
Message |
cobcurious Beginner
Joined: 04 Oct 2003 Posts: 68 Topics: 25
|
Posted: Thu Dec 18, 2003 10:55 pm Post subject: Dbkey |
|
|
Hi,
Can anybody please interpret the meaning of :-
MOVE -1 TO DBKEY .
What does it mean,we can't have -1 page ..right ?
Regards
Cobcurious |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Fri Dec 19, 2003 6:27 am Post subject: |
|
|
cobcurious,
It would be easier if you could provide as to which language/database you are refering.
If I had to take a guess I am assuming that moving -1 to dbkey is to start searching for positive numbers just like move low-values to search-key
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
cobcurious Beginner
Joined: 04 Oct 2003 Posts: 68 Topics: 25
|
Posted: Sat Dec 20, 2003 11:56 pm Post subject: |
|
|
Hi Kolusu,
I am referring to this statement from IDMS.DBKEY being a numeric field,we could have moved zeros to it to represent the lowest possible values for the DBkey which physically means 0th line on the 0th page.I am not sure whether we have 0th page number or not.Pls tell me where does this -1 come from ? Why can't we move zeros instead? Does -1 indicate some special instruction ?
Regards
cobcurious |
|
Back to top |
|
|
raggop Beginner
Joined: 05 Feb 2003 Posts: 19 Topics: 3
|
Posted: Mon Dec 22, 2003 6:43 am Post subject: |
|
|
Cobcurious,
never seen move -1 to dbkey. The statements i've seen accept dbkeys into working storage from dbkey. Can you tell me what are the idms statements executed after moving -1 into dbkey.
raghu |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Mon Dec 22, 2003 11:02 am Post subject: |
|
|
Only from memory....
I remember doing this when I had to STORE a DIRECT(?) (or, was it a standalone) record, i.e. a record without CALC key or a member of a set. I think, you are moving -1 before storing.
If that is indeed the case, then, I think, the reason for doing this, is to keep the stored records as "close" as possible. I might be wrong here. (it is been over 4 months since I lost touch of IDMS). I suggest, you look into the compiler listing. That is how, I could make some progress in understanding the meaning of -1. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
vkrishna2001 Beginner
Joined: 07 Aug 2003 Posts: 46 Topics: 18 Location: Danbury
|
Posted: Mon Dec 22, 2003 2:02 pm Post subject: |
|
|
Cogito,
What you said is right.
Cobcurious,
The following URL is for Navigational DML Programming reference manual. Refer to section 4.5.1
ftp://ftp.ca.com/pub/idms/docs/idms15/pdf/IDDMLF01.PDF
Hope this helps,
Vijayakrishna |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Mon Dec 22, 2003 2:15 pm Post subject: |
|
|
vkrishna2001,
I am??
Wow! My memory isn't as bad as I thought it was! _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
cobcurious Beginner
Joined: 04 Oct 2003 Posts: 68 Topics: 25
|
Posted: Thu Dec 25, 2003 10:57 pm Post subject: |
|
|
Hi,
I thank all of you doe your help.VijayKrishna,Thank you very much for the wonderful link.
Regds
Cobcurious |
|
Back to top |
|
|
vivek Beginner
Joined: 15 Jul 2004 Posts: 95 Topics: 11 Location: Edison,NJ
|
Posted: Mon Jul 26, 2004 9:58 pm Post subject: |
|
|
As far as I know, to store a direct locaiton mode record you move
Move -1 to Direct-dbkey. Not to DBKEY. Subschema control has two dbkey entries one just dbkey another is direct dbkey.
if you move -1 to dbkey you cannot store direct location mode records. you need to move it to direct dbkey.
moving -1 to dbkey usually initialises your currency position in a page. if you dont use it , you may get an error 12XX ( i dont remember exactly ) meaning DB KEY out of page limits.
Sorry for late response. I am a new member and just stumbled on this, thought of passing my opinion. _________________ Vivek,NJ
Db2,IDMS |
|
Back to top |
|
|
cobcurious Beginner
Joined: 04 Oct 2003 Posts: 68 Topics: 25
|
Posted: Thu Sep 02, 2004 11:20 pm Post subject: |
|
|
Hey Vivek,
Thanks for your thoughts,they were of great help of getting an insight into the funda of dbkey
Thanks
Cobcurious |
|
Back to top |
|
|
|
|