[Info-vax] multiple RMS records in one call (Re: wrong file format)
Craig A. Berry
craigberry at nospam.mac.com
Thu Jan 7 22:53:37 EST 2021
On 1/7/21 9:18 PM, Dave Froble wrote:
> On 1/7/2021 6:48 PM, Craig A. Berry wrote:
>> On 1/7/21 2:35 PM, 1tim.... at gmail.com wrote:
>>> It's a lot easier to create a service that grabs a bunch of records
>>> in a single call than to have to loop and accumulate the data for the
>>> call.
>>
>> So why not use one of the various mechanisms that already do that? E.g.,
>> to get a list of all the usernames on your system, do:
>>
>> $ perl -"MVMS::IndexedFile" -e
>> "tie(%uaf,VMS::IndexedFile,'sys$system:sysuaf.dat',0); print join
>> qq/\n/, keys(%uaf);"
>> APACHE$WWW
>> CRAIG
>> DEFAULT
>> HTTP$NOBODY
>> <snip>
>>
>> All of that could easily be accumulated in an array, and there are a
>> variety of other ways to capture RMS data into whatever data structures
>> you want. Python no doubt has other mechanisms. I don't think making
>> it into a system service gets you much over what's already out there.
>
> I'm not trying to be a smart-ass (yeah, like anyone believes that) but
> how is perl accessing the data? I don't know any way to look at the
> data other than reading through the records. That is not going to avoid
> the overhead that Hein mentioned. Even if mapping the file in a global
> section, one would still need to break out the records and the username
> data. Though that should avoid the overhead of RMS doing the reads.
>
> Recordsets of lots of data are nice for some tasks. They sort of aren't
> much help for other tasks. When doing updates in each record of a
> recordset, if exclusive access to the table(s) doesn't exist, updating
> is non-trivial.
Sure, something is iterating over the records, but that's not something
the developer has to worry about. Are there more context switches than
one would get with a real RDBMS? Almost certainly.
But so would there be if the interface requested by the OP were
implemented by DEC/CPQ/HP/HPE/VSI engineering in MACRO or BLISS or C or
whatever, which would also be internally iterating over records. Unless
the interface were limited to fixed-length records, in which case
multiple records could be snagged via IO$_PERFORM or section mapping as
has been mentioned else-thread, but that's not a general solution for
all record formats.
More information about the Info-vax
mailing list