MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dbkey

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
cobcurious
Beginner


Joined: 04 Oct 2003
Posts: 68
Topics: 25

PostPosted: Thu Dec 18, 2003 10:55 pm    Post subject: Dbkey Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Dec 19, 2003 6:27 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
cobcurious
Beginner


Joined: 04 Oct 2003
Posts: 68
Topics: 25

PostPosted: Sat Dec 20, 2003 11:56 pm    Post subject: Reply with quote

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 ? Rolling Eyes
Regards
cobcurious
Back to top
View user's profile Send private message
raggop
Beginner


Joined: 05 Feb 2003
Posts: 19
Topics: 3

PostPosted: Mon Dec 22, 2003 6:43 am    Post subject: Reply with quote

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
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Mon Dec 22, 2003 11:02 am    Post subject: Reply with quote

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
View user's profile Send private message
vkrishna2001
Beginner


Joined: 07 Aug 2003
Posts: 46
Topics: 18
Location: Danbury

PostPosted: Mon Dec 22, 2003 2:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Mon Dec 22, 2003 2:15 pm    Post subject: Reply with quote

vkrishna2001,
I am??

Wow! My memory isn't as bad as I thought it was! Smile
_________________
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
View user's profile Send private message
cobcurious
Beginner


Joined: 04 Oct 2003
Posts: 68
Topics: 25

PostPosted: Thu Dec 25, 2003 10:57 pm    Post subject: Reply with quote

Hi,
I thank all of you doe your help.VijayKrishna,Thank you very much for the wonderful link.
Regds
Cobcurious
Back to top
View user's profile Send private message
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Mon Jul 26, 2004 9:58 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
cobcurious
Beginner


Joined: 04 Oct 2003
Posts: 68
Topics: 25

PostPosted: Thu Sep 02, 2004 11:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group