[Info-vax] Hard links on VMS ODS5 disks
Johnny Billquist
bqt at softjar.se
Mon Jul 17 10:37:25 EDT 2023
On 2023-07-17 13:36, Jan-Erik Söderholm wrote:
> Den 2023-07-17 kl. 12:52, skrev Johnny Billquist:
>> On 2023-07-16 20:09, Arne Vajhøj wrote:
>>> On 7/15/2023 10:47 AM, Johnny Billquist wrote:
>>>> And the secondary problem being that it's a little tricky to find
>>>> the last n lines in such a file organization. You'll have to do some
>>>> heuristics, and hope you got it right. But that usually is possible
>>>> to do with a high chance of success. So it could definitely be done.
>>>> (I have such a tool for RSX...)
>>>
>>> It depends on the record format.
>>
>> Right. But in this case, the record format was given.
>>
>>> VAR,VFC => read from start or make a good guess
>>> FIX, STM, STMLF, STMCR => no problem
>>> UDF => "last n lines" is not defined
>>
>> And in this case it was VFC. And as I said - you can usually make a
>> good guess.
>>
>> Johnny
>>
>
> But, "read from start" is the same as TYPE without /TAIL. And that is
> what I do when I get that error from TYPE/TAIL. Just TYPE the log file
> and let it scroll to the end, the net result is the same as when using
> /tail, the last 24 (or so) lines are on the screen. And besides, more
> lines are available based on the size of my scroll-back buffer in the
> emulator, usually 20000 or 200000 lines.
Notice the "or" keyword in there... ;-)
The "make a good guess" is basically about jumping close to the end of
the file, and trying to identify the VFC lenght fields, and from that
extract the actual lines, and show the last n of them.
Which usually can be done with a fair amount of confidence, since for
text files, lines are seldom extremely long, nor do they contain random
control characters. Thus, if you just scan for control characters
(probably NUL) on an odd byte, this is most likely the second byte of a
record length, and you have your line starting there. And then
everything else follows trivially from that.
No need to read through the whole file. But it requires that you
actually read the full disk blocks of content, and not the pre-processed
data coming out of RMS.
Johnny
More information about the Info-vax
mailing list