[Info-vax] multiple RMS records in one call (Re: wrong file format)
Dave Froble
davef at tsoft-inc.com
Thu Jan 7 22:18:09 EST 2021
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.
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
More information about the Info-vax
mailing list