- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- RMS indexed files.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2009 02:00 AM
тАО05-18-2009 02:00 AM
Hi all, I'm having quite problems trying to solve and issue with RMS files. The problem is the following. I have an indexed file with both, primary and alternate key, I want to retrieve all registers with same alternate key, of course I can do a sequential read and retrive them, but it seems quite inefficient, C is able to locate first register with an specified alternate key. Can it not locate next record with same altenate key?? It is hard to believe, but trusting some examples it can not.
Do you know if it is possible to do what I want to? if so, How?
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2009 04:05 AM
тАО05-18-2009 04:05 AM
SolutionHere is what you have to do:
SYS$OPEN the file
SYS$CONNECT a RAB
SET: RAB$B_KRF to the desired key NUMBER (1?)
SET: RAB$L_KBB/RAB$B_KSZ to the target key VALUE
SET: RAB$B_RAC to RAB$C_KEY
Do the first SYS$GET or an initial SYS$FIND
GET will deliver the data as decscribed in RBF/RSZ in the buffer set up by UBF/USZ.
SYS$FIND only positions. No data returned it typically allows for cleaner coding.
SET: RAB$B_RAB to RAB$C_SEQ
SET: RAB$V_LIM in RAB$L_ROP
LOOP: SYS$GET test for succes to know ther eis data, but also for RMS$_OK_LIM to know whether the end of the selected key value is reached without having to do the key fields compare yourself.
http://h71000.www7.hp.com/doc/731final/4523/4523pro_011.html#index_x_550
Please note the when retrieving a large (more than 5%?) portion of the whole file it may well be MORE efficient to read the whole file from start to finish with program or tool (DATATRIEVE, SORT, Vselect, DIX,...).
Hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2009 05:21 AM
тАО05-18-2009 05:21 AM
Re: RMS indexed files.
http://labs.hoffmanlabs.com/node/1260
BSD-style license.
It doesn't use the OK_LIM stuff, but it can deal with sequential access and the keyed access.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2009 02:45 PM
тАО05-18-2009 02:45 PM
Re: RMS indexed files.
> but it seems quite inefficient
I'm not sure I understand the problem here. As per Hein's example, you read on the alternate key, then read sequentially to read further records with the same key value. Note that by RMS rules, they will be returned in temporal insertion order.
>but trusting some examples it can not.
Please post your example. Tell us what it's doing and what you expect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2009 01:14 AM
тАО05-19-2009 01:14 AM
Re: RMS indexed files.
Thanks to all, especially to the first guy answer (with such a weird name), it was an awesome explanation.
You and people like you make this page great!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2009 01:34 AM
тАО05-19-2009 01:34 AM
Re: RMS indexed files.
I'm glad you have solved your particular problem. However, the principle of the forum is that we share knowledge and experiences.
To that end, it is very useful if you are able to explain what the problem was and how you fixed it.
This will help ensure that the forum is used on a 'give and take' basis.
Your comments about Hein's name made me smile. Don't exepct a call from the UN anytime soon :-)
Craig
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2009 04:06 AM
тАО05-19-2009 04:06 AM
Re: RMS indexed files.
The problem was exactly what I said, I was trying to find some alternate (and duplicate) keys but I didn't want to read all file sequentially, so I was looking for the right option for rab$l_rop but I found no good one. 'Cause although everything is very good documented in my humble opinion it should be more arrange. Eventually RAB$V_LIM was the option I was expecting to.
And I want to do just a small clarification about ... emmm ... about weird's name solution :-) after set rab$rop to v_lim it is necesary "activate" v_lim (xrab.rab$v_lim = 1;)
Thanks again to all you.