[Info-vax] Indexed RMS file question
P. Sture
paul.nospam at sture.ch
Sun Oct 4 09:45:55 EDT 2009
In article
<aaf89ee9-5acc-4d31-b397-ff9a6d1b5582 at v36g2000yqv.googlegroups.com>,
"Hein, Nashua NH" <heinvandenheuvel at gmail.com> wrote:
> Sorry, we need to know NOW.
> If you want RMS'es help with this then you need to store those
> integers integer values in TEXT representation either with leading
> zeroes, or right justified. Can do?
> The reason is that RMS only allows STRING fields in segmented keys,
> and you are going to want to use segmented keys.
>
> [ actually.. you can use integers, but you need to segment them a byte
> at a time in reverse order and you'll soon hit the 8 segment max
> besides it looking rather ugly and unmaintainable as in "try to
> explain it to the next guy" ]
There is an another way, which is to reverse the bytes of integers
stored in the record itself. This means you don't hit the 8 segment max
as soon but it's ugly; you have to "unreverse" the integer key contents
of a read record for your program to understand it, and using
DUMP/RECORD on the file is also ugly.
I used to use packed decimal instead of integers for key segments. It's
just so easy to do with COBOL.
Knowing the implementation language would be very useful.
--
Paul Sture
More information about the Info-vax
mailing list