[Info-vax] The best VMS features, was: Re: openvms renaming file

Arne Vajhøj arne at vajhoej.dk
Tue May 29 20:00:19 EDT 2018


On 5/29/2018 7:53 PM, Johnny Billquist wrote:
> On 2018-05-30 01:30, Arne Vajhøj wrote:
>> On 5/29/2018 7:12 PM, Johnny Billquist wrote:
>>> On 2018-05-29 01:16, Arne Vajhøj wrote:
>>>> On 5/28/2018 4:08 PM, Johnny Billquist wrote:
>>>>> Applications could be clever enough to actually refer to fields 
>>>>> based on names, instead of just using fixed, known, chunks of the 
>>>>> record. RMS do have names for the fields, which you can set and read.
>>>>
>>>> Both keys and values or only keys?
>>>>
>>>> I suspect key info is in XABKEY, but where do you find value info?
>>>
>>> What do you mean by value info? The values are in the individual 
>>> records obviously. And the key info will tell you which bytes in the 
>>> record that contains the value. Or are you talking about the type of 
>>> the value? Which also also stored with they key info.
>>>
>>> Not entirely sure what you are thinking of....
>>
>> If you have a record with 12 fields:
>>
>> Key_1
>> Key_2
>> Value_1
>> ...
>> Value_10
>>
>> then I assume that I can get the names, indexes and size for
>> Key_1 and Key_2 from XABKEY (I have not tried it, but it looks
>> promising), but I have no idea where I would get names, indexes
>> and size for Value_1, ..., Value_10.
> 
> I think we're talking past each other. A record is all values. The keys 
> are the names of the fields.
> What you call "key_1" here is for me a value. (Or maybe I'm 
> misunderstanding you.)
> However, as Hoff pointed out, fields that are not defined as keys do not 
> have this kind of meta information.
> 
> So if you have fields which are not defined as keys, then you will not 
> have this information. I was in my mind looking at the case that you 
> have keys defined for all the fields.

I see a record as consisting of fields and those fields can be
either key fields or value fields.

It is possible a RDBMS way of describing things.

But it does match rather well how RMS index-sequential file
access work in VMS Pascal.

Example:

type
    string = varying [255] of char;
    fixstring = packed array [1..8] of char;
    isqrec = record
                keyfield  : [KEY(0)] fixstring;
                bodyfield : string;
             end;

But I think we got it sorted out.

Arne




More information about the Info-vax mailing list