View previous topic :: View next topic |
Author |
Message |
ayush Beginner
Joined: 26 Feb 2004 Posts: 20 Topics: 14
|
Posted: Wed Aug 04, 2004 12:39 pm Post subject: Help Needed for DB-Key in IDMS |
|
|
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 |
|
 |
vkrishna2001 Beginner

Joined: 07 Aug 2003 Posts: 46 Topics: 18 Location: Danbury
|
Posted: Wed Aug 04, 2004 8:34 pm Post subject: |
|
|
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 |
|
 |
ayush Beginner
Joined: 26 Feb 2004 Posts: 20 Topics: 14
|
Posted: Thu Aug 05, 2004 8:11 am Post subject: |
|
|
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 |
|
 |
vkrishna2001 Beginner

Joined: 07 Aug 2003 Posts: 46 Topics: 18 Location: Danbury
|
Posted: Thu Aug 05, 2004 9:07 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Aug 05, 2004 10:12 am Post subject: |
|
|
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 |
|
 |
shash_modi Beginner

Joined: 22 Apr 2008 Posts: 26 Topics: 9 Location: Mumbai
|
Posted: Tue Jul 13, 2010 8:03 am Post subject: |
|
|
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 |
|
 |
|
|