[Info-vax] naming convention in VMS MAIL
Phillip Helbig undress to reply
helbig at asclothestro.multivax.de
Sun Dec 23 17:29:16 EST 2018
In article <1df3cd57-36c4-4771-9708-db6d8bdac9c4 at googlegroups.com>, Hein
RMS van den Heuvel <heinvandenheuvel at gmail.com> writes:
> On Wednesday, December 19, 2018 at 4:25:53 PM UTC-5, Phillip Helbig
> (undress to reply) wrote:
>
> > VMS MAIL has files like MAIL$45870BB2000500B0.MAI;1. The digits are not
> > random, but are related to (at least) the date and time. What is the
> > exact format? Has it changed in the last 25 years?
>
> Hmm, I don't know why our friend Steve start to waffle about API's,
> opaqueness, performance and such. The question was highly specific.
> "What is the exact format". There is no suggestion Philips wants to do
> something useful with that. Perhaps just curious.
Yes.
> Good links though.
Yes.
A bit of background: Suppose I have filed a message but forgot where.
(Yes, there is MLSEARCH, and a while back Hunter was kind enough to make
it work on ALPHA, but I think it has a memory leak or something since if
it runs for too long everything freezes up.) With DIR/SINCE/BEFORE I
can easily find the MAIL$* files from the time in question, and hence
the directory (I have very many mailfiles in a couple of dozen
directories. This is what made me wonder about the format.
> The format was once changes in the early 90's or so when the old linear
> date-time to name mapping was found to deliver horrible performance
> problems on mail 'purge' due to constant directory block shuffles as
> folks tend to delete old Email. The revised algorithm picked a 'middle'
> piece of the date-time as MSB somewhat randomizing external messages
> over the sub-directory, but potentially leaving horribly sparse
> directories. All that don't matter much.
>
> Below a piece of (sadly undocumented) DCL I wrote ages ago which has the
> core algorithm. The script finds 'missing' mail records in the MAIL.MAI
> indexed file opening it twice, once to scan, once to to lookups. I know
> I have written a better description, but can't find is just now.
>
> The mail 'message key' is constructed as:
>
> $mes="12345678" ! Allocate 8 bytes
> $mes[48,16]=%x0005 ! Hard coded
> $mes[00,32]=F$CVSI(16,32,rec) ! MSB form binary date-time
> $mes[32,16]=F$CVSI(48,16,rec) ! LSB from binary date-time
Yes, that explains it. Thanks!
More information about the Info-vax
mailing list