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 

Help Needed for DB-Key in IDMS

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


Joined: 26 Feb 2004
Posts: 20
Topics: 14

PostPosted: Wed Aug 04, 2004 12:39 pm    Post subject: Help Needed for DB-Key in IDMS Reply with quote

Hi,

I have got a list of DB Keys which I have to use as input for my code in IDMS database.
The problem is that when I use that DB KEY in DMLO to obtain a program using the command
eg. OBTAIN &D DB-KEY IS 780810305
I get the message "PAGE NUMBER TOO LARGE"
the list i have got has all the DBKEYS in this format only where as when look at any db-key value in DMLO it is of the format
0004915175-0011(for an instance!)

Please let me know how to convert the above form into the given form.

Thanks.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
vkrishna2001
Beginner


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

PostPosted: Wed Aug 04, 2004 8:34 pm    Post subject: Reply with quote

Ayush,

To get the page number Divide 780810305 by 256.
Code:

780810305 / 256 = 3050040.25390625

Page number is 3050040

To get line number multiply fraction with 256
Code:

.25390625 *256 = 65


Then use the command

Code:
OBTAIN &D DB-KEY 3050040-65

Hope this helps

Regards,
Vijay
Back to top
View user's profile Send private message Send e-mail
ayush
Beginner


Joined: 26 Feb 2004
Posts: 20
Topics: 14

PostPosted: Thu Aug 05, 2004 8:11 am    Post subject: Reply with quote

Hi Krishna

Thanks for the suggestion. The conversion is workign good when i tried in DMLO.
But when i passed in the input dbkeys in the form 3050040-65 to my program the same command fails and gives error code 0302.
I checked in dmlo the same db-key with the same command was giving status OK but when in program it abended.
Is there any special way to input the dbkey?I have tried using without a hyphen
305004065 , tried adding leading zeroes(before page number) and before line number as looks in DMLO, but all of them are failing.
Can you please suggest if there's any different way of input?

Thanks.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
vkrishna2001
Beginner


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

PostPosted: Thu Aug 05, 2004 9:07 am    Post subject: Reply with quote

Ayush,

In the Cobol application program if you are trying to obtain a record instance with DBKEY the data item which has DBKEY should have picture clause of S9(08 ) COMP. In Easytrieve it should be Binary four bytes.

In the input file if you have 780810305 for DB-KEY , in the application program move this to a data item with picture clause S9(08 ) COMP and try to use this to obtain the record instance.

Regards,
Vijay
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Aug 05, 2004 10:12 am    Post subject: Reply with quote

Ayush,

Quote:
command fails and gives error code 0302.


Normal IDMS programming results in a four character error code being returned from each call
to IDMS (on any DML verb such as OBTAIN, MODIFY, STORE, BIND, READY, etc
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shash_modi
Beginner


Joined: 22 Apr 2008
Posts: 26
Topics: 9
Location: Mumbai

PostPosted: Tue Jul 13, 2010 8:03 am    Post subject: Reply with quote

Hi,

But how to convert the DB-KEY obtain from COBOL code to the DB-KEY as seen on the DMLO screen?
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