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

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


On 5/29/2018 7:41 PM, Simon Clubley wrote:
> On 2018-05-29, Johnny Billquist <bqt at softjar.se> 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_ I understand Arne correctly, he is asking the following:
> 
> Consider a C struct which is mapped to a RMS record:
> 
> struct record_type
> 	{
> 	unsigned char primary_key[10];	/* This is the ISAM primary key */
> 	unsigned char value1[5];	/* Data value 1 */
> 	unsigned char value2[7];	/* Data value 2 */
> 	unsigned char value3[10];	/* Data value 3 and an alternate key */
> 	};
> 
> You can find "primary_key" and "value3" in the key information.
> 
> Where is value1 and value2 described in the RMS data structures ?
> value1 and value2 are data fields only and do not have keys on them.
> 
> IOW, what happens if value1 is extended from 5 bytes to 8 bytes ?
> 
> This moves the start position of value2 to the right by 3 bytes.
> 
> What field(s) in the RMS data structures can the application look
> at to find the new offset to the start of value2 ?

Yes.

Arne




More information about the Info-vax mailing list