[Info-vax] Re; Spiralog, RMS Journaling (was Re: FREESPADRIFT)

VAXman- at SendSpamHere.ORG VAXman- at SendSpamHere.ORG
Thu Jun 30 11:15:34 EDT 2016


In article <nl35rj$v6l$1 at Iltempo.Update.UU.SE>, Johnny Billquist <bqt at softjar.se> writes:
>On 2016-06-30 14:48, VAXman- at SendSpamHere.ORG wrote:
>> In article <nl0k69$nov$1 at Iltempo.Update.UU.SE>, Johnny Billquist <bqt at softjar.se> writes:
>>> On 2016-06-29 15:45, VAXman- at SendSpamHere.ORG wrote:
>>>> In article <nl0gec$fke$1 at Iltempo.Update.UU.SE>, Johnny Billquist <bqt at softjar.se> writes:
>>>>> It is not the size of the file on the disk. Simple as that.
>>>>
>>>> You're too thick.
>>>
>>> Calling an apple a pear won't make it so.
>>>
>>> What you try to talk about is the size of your data on the disk, which
>>> is not the same as the size of the file on the disk.
>>> And we have already established that figuring out the size of your data
>>> on the disk is also not doable in VMS.
>>>
>>> You can call ma any number of names, if that makes you happier. But at
>>> the end of the day, nothing have changed. And starting to call names is
>>> really not much of a technical argument.
>>
>> Well, I know you don't want to go beyond your precious "C" but, since you do
>> seem to be implying sequential files, you might find some solace in the RMS
>> XABITM XAB$_FILE_LENGTH_HINT.  I can show you how to invoke the RMS from "C"
>> if you request.
>
>Your assumption on my C preference is incorrect. I know C. Don't mean I 
>don't know other languages, or that C is my preferred language. It's a 
>language that sometimes is useful, but if I can choose, I'll take 
>MACRO-11 thank you very much.
>
>And at the end of the day, your file have still taken the same amount of 
>space on the disk, no matter where your EOF pointers point to. And 
>unless VMS works differently than RSX (which I seriously doubt), the 
>file size, as used on the disk, is something kept track of by the ACP, 
>which is what deals with the actual file.
>RMS is the layer that cares about the EOF pointer. But RMS do not deal 
>directly with the disk, but is actually just dealing with the file, as 
>given by the ACP. So your EOF pointer is not even something the actual 
>file level layer is even aware of. Now, I know that the water is much 
>more muddled on the VMS side. In RSX the separation between these layers 
>are very simple and clear, and you don't even have to use RMS when you 
>access your file. You can do your IO requests directly to the ACP, if 
>you want to.

LOGIN.COM;1                   File ID:  (55988,7,0)           
Size:           15/48         Owner:    [SYSMGTGRP,SYSTEM]
Created:    14-DEC-2004 06:42:38.70
Revised:    27-MAR-2007 18:44:30.57 (3)
Expires:    <None specified>
Backup:     <No backup recorded>
Effective:  <None specified>
Recording:  <None specified>
Accessed:   <None specified>
Attributes: <None specified>
Modified:   27-MAR-2007 18:44:30.57
Linkcount:  1
File organization:  Sequential  <<<========
Shelved state:      Online 
Caching attribute:  Writethrough
File attributes:    Allocation: 48, Extend: 0, Global buffer count: 0, No version limit
Record format:      Variable length, maximum 255 bytes, longest 124 bytes   <<<========
--------------------^^^^^^^^^^^^^^^
Record attributes:  Carriage return carriage control   <<<========
RMS attributes:     None
Journaling enabled: None
File protection:    System:RWED, Owner:RWED, Group:RE, World:
Access Cntrl List:  (AUDIT=SECURITY,OPTIONS=PROTECTED,ACCESS=READ+WRITE+DELETE+CONTROL+SUCCESS+FAILURE)
Client attributes:  None

Total of 1 file, 15/48 blocks.



$ SEARCH/NOOUTPUT/STATISTICS LOGIN.COM ""

Files searched:                 1       Buffered I/O count:         5
Records searched:             255 <===  Direct I/O count:           1
Characters searched:        11333 <===  Page faults:               16
Records matched:              255       Elapsed CPU time:  0 00:00:00.01
Lines printed:                  0       Elapsed time:      0 00:00:00.00

Hmm... looks like 255 records in the LOGIN.COM and SEARCH checked 11333 bytes
of data in the file.



$ PIPE DUMP/HEADER/BLOCKS=COUNT=0 LOGIN.COM | -
  SEARCH/MATCH=AND SYS$PIPE "End of file",":"
        End of file block:                24
        End of file byte:                 220

$ SIZE = (24-1)*512+220
$ SHOW SYMBOL SIZE
  SIZE = 11996   Hex = 00002EDC  Octal = 00000027334

That's the size of the "file" on the disk.



$ WRITE SYS$OUTPUT "''F$file_attributes("LOGIN.COM","FILE_LENGTH_HINT")'"
(255,11333)
 ||| ^^^^^--- size of file data (in bytes)
 ^^^--------- count of file records

Well, whadya know.  There's the record count (in agreement with the SEARCH's
statistics) and there's the file *data* size (in agreement with the SEARCH's
statistics).



I wonder if this tells me any more???  Let's see...

File's size on disk is (24-1)*512+220.  (Note, you continue to poo-poo this
too!)  There are 255 records in a variable length record format file.  That
means there are 2 bytes/record of prepended length count.

So, (24-1)*512+220-2*255 = 11486.  Both SEARCH and FILE_LENGTH_HINT indicate
that the Data size is 11333.  Compute the difference of 11486 - 11333 = 153.
*** Keep your eye on the prize!  

So now, without further adieu...

$ PIPE DUMP/RECORD LOGIN.COM | SEARCH SYS$PIPE "Record number" > RECORD.TXT

Edit RECORD.TXT and remove the entries with even record lengths yields:

Record number 3 (00000003), 21 (0015) bytes, RFA(0001,0000,010C)
Record number 4 (00000004), 1 (0001) byte, RFA(0001,0000,0124)
Record number 5 (00000005), 19 (0013) bytes, RFA(0001,0000,0128)
Record number 6 (00000006), 13 (000D) bytes, RFA(0001,0000,013E)
Record number 8 (00000008), 75 (004B) bytes, RFA(0001,0000,015A)
Record number 10 (0000000A), 37 (0025) bytes, RFA(0001,0000,01F4)
Record number 12 (0000000C), 71 (0047) bytes, RFA(0002,0000,0020)
Record number 13 (0000000D), 1 (0001) byte, RFA(0002,0000,006A)
Record number 16 (00000010), 1 (0001) byte, RFA(0002,0000,00D4)
Record number 17 (00000011), 7 (0007) bytes, RFA(0002,0000,00D8)
Record number 18 (00000012), 31 (001F) bytes, RFA(0002,0000,00E2)
Record number 22 (00000016), 1 (0001) byte, RFA(0002,0000,0158)
Record number 24 (00000018), 73 (0049) bytes, RFA(0002,0000,01E6)
Record number 26 (0000001A), 51 (0033) bytes, RFA(0003,0000,0046)
Record number 27 (0000001B), 1 (0001) byte, RFA(0003,0000,007C)
Record number 29 (0000001D), 11 (000B) bytes, RFA(0003,0000,00B0)
Record number 31 (0000001F), 29 (001D) bytes, RFA(0003,0000,00DC)
Record number 33 (00000021), 39 (0027) bytes, RFA(0003,0000,0122)
Record number 35 (00000023), 43 (002B) bytes, RFA(0003,0000,015E)
Record number 36 (00000024), 1 (0001) byte, RFA(0003,0000,018C)
Record number 40 (00000028), 1 (0001) byte, RFA(0003,0000,01EA)
Record number 42 (0000002A), 61 (003D) bytes, RFA(0004,0000,002E)
Record number 45 (0000002D), 31 (001F) bytes, RFA(0004,0000,009C)
Record number 48 (00000030), 1 (0001) byte, RFA(0004,0000,0106)
Record number 50 (00000032), 1 (0001) byte, RFA(0004,0000,0134)
Record number 54 (00000036), 77 (004D) bytes, RFA(0004,0000,01DA)
Record number 56 (00000038), 41 (0029) bytes, RFA(0005,0000,0078)
Record number 58 (0000003A), 71 (0047) bytes, RFA(0005,0000,00AA)
Record number 59 (0000003B), 1 (0001) byte, RFA(0005,0000,00F4)
Record number 61 (0000003D), 1 (0001) byte, RFA(0005,0000,011A)
Record number 63 (0000003F), 1 (0001) byte, RFA(0005,0000,0160)
Record number 64 (00000040), 39 (0027) bytes, RFA(0005,0000,0164)
Record number 65 (00000041), 1 (0001) byte, RFA(0005,0000,018E)
Record number 67 (00000043), 51 (0033) bytes, RFA(0005,0000,01C6)
Record number 69 (00000045), 33 (0021) bytes, RFA(0006,0000,0024)
Record number 70 (00000046), 1 (0001) byte, RFA(0006,0000,0048)
Record number 71 (00000047), 51 (0033) bytes, RFA(0006,0000,004C)
Record number 72 (00000048), 43 (002B) bytes, RFA(0006,0000,0082)
Record number 73 (00000049), 41 (0029) bytes, RFA(0006,0000,00B0)
Record number 74 (0000004A), 43 (002B) bytes, RFA(0006,0000,00DC)
Record number 75 (0000004B), 43 (002B) bytes, RFA(0006,0000,010A)
Record number 76 (0000004C), 45 (002D) bytes, RFA(0006,0000,0138)
Record number 78 (0000004E), 67 (0043) bytes, RFA(0006,0000,0196)
Record number 79 (0000004F), 65 (0041) bytes, RFA(0006,0000,01DC)
Record number 80 (00000050), 51 (0033) bytes, RFA(0007,0000,0020)
Record number 83 (00000053), 45 (002D) bytes, RFA(0007,0000,00B2)
Record number 84 (00000054), 1 (0001) byte, RFA(0007,0000,00E2)
Record number 85 (00000055), 57 (0039) bytes, RFA(0007,0000,00E6)
Record number 87 (00000057), 73 (0049) bytes, RFA(0007,0000,0126)
Record number 90 (0000005A), 1 (0001) byte, RFA(0007,0000,01FC)
Record number 92 (0000005C), 1 (0001) byte, RFA(0008,0000,004A)
Record number 93 (0000005D), 47 (002F) bytes, RFA(0008,0000,004E)
Record number 94 (0000005E), 65 (0041) bytes, RFA(0008,0000,0080)
Record number 95 (0000005F), 1 (0001) byte, RFA(0008,0000,00C4)
Record number 96 (00000060), 23 (0017) bytes, RFA(0008,0000,00C8)
Record number 98 (00000062), 33 (0021) bytes, RFA(0008,0000,0102)
Record number 100 (00000064), 1 (0001) byte, RFA(0008,0000,0144)
Record number 101 (00000065), 39 (0027) bytes, RFA(0008,0000,0148)
Record number 107 (0000006B), 43 (002B) bytes, RFA(0009,0000,0046)
Record number 108 (0000006C), 1 (0001) byte, RFA(0009,0000,0074)
Record number 109 (0000006D), 37 (0025) bytes, RFA(0009,0000,0078)
Record number 110 (0000006E), 1 (0001) byte, RFA(0009,0000,00A0)
Record number 112 (00000070), 47 (002F) bytes, RFA(0009,0000,00D8)
Record number 113 (00000071), 1 (0001) byte, RFA(0009,0000,010A)
Record number 114 (00000072), 47 (002F) bytes, RFA(0009,0000,010E)
Record number 115 (00000073), 41 (0029) bytes, RFA(0009,0000,0140)
Record number 121 (00000079), 55 (0037) bytes, RFA(000A,0000,004A)
Record number 123 (0000007B), 41 (0029) bytes, RFA(000A,0000,00B4)
Record number 125 (0000007D), 1 (0001) byte, RFA(000A,0000,010C)
Record number 127 (0000007F), 1 (0001) byte, RFA(000A,0000,0144)
Record number 128 (00000080), 41 (0029) bytes, RFA(000A,0000,0148)
Record number 132 (00000084), 1 (0001) byte, RFA(000B,0000,0032)
Record number 134 (00000086), 63 (003F) bytes, RFA(000B,0000,0062)
Record number 135 (00000087), 63 (003F) bytes, RFA(000B,0000,00A4)
Record number 136 (00000088), 65 (0041) bytes, RFA(000B,0000,00E6)
Record number 137 (00000089), 61 (003D) bytes, RFA(000B,0000,012A)
Record number 138 (0000008A), 61 (003D) bytes, RFA(000B,0000,016A)
Record number 139 (0000008B), 61 (003D) bytes, RFA(000B,0000,01AA)
Record number 140 (0000008C), 61 (003D) bytes, RFA(000B,0000,01EA)
Record number 141 (0000008D), 61 (003D) bytes, RFA(000C,0000,002A)
Record number 142 (0000008E), 57 (0039) bytes, RFA(000C,0000,006A)
Record number 143 (0000008F), 53 (0035) bytes, RFA(000C,0000,00A6)
Record number 146 (00000092), 61 (003D) bytes, RFA(000C,0000,0168)
Record number 147 (00000093), 1 (0001) byte, RFA(000C,0000,01A8)
Record number 149 (00000095), 1 (0001) byte, RFA(000C,0000,01D6)
Record number 152 (00000098), 1 (0001) byte, RFA(000D,0000,0068)
Record number 155 (0000009B), 1 (0001) byte, RFA(000D,0000,00D2)
Record number 156 (0000009C), 61 (003D) bytes, RFA(000D,0000,00D6)
Record number 159 (0000009F), 73 (0049) bytes, RFA(000D,0000,01A6)
Record number 161 (000000A1), 81 (0051) bytes, RFA(000E,0000,0048)
Record number 162 (000000A2), 1 (0001) byte, RFA(000E,0000,009C)
Record number 164 (000000A4), 117 (0075) bytes, RFA(000E,0000,0116)
Record number 165 (000000A5), 117 (0075) bytes, RFA(000E,0000,018E)
Record number 166 (000000A6), 105 (0069) bytes, RFA(000F,0000,0006)
Record number 168 (000000A8), 123 (007B) bytes, RFA(000F,0000,00EE)
Record number 173 (000000AD), 115 (0073) bytes, RFA(0010,0000,0154)
Record number 179 (000000B3), 41 (0029) bytes, RFA(0011,0000,01DA)
Record number 180 (000000B4), 41 (0029) bytes, RFA(0012,0000,0006)
Record number 181 (000000B5), 41 (0029) bytes, RFA(0012,0000,0032)
Record number 182 (000000B6), 41 (0029) bytes, RFA(0012,0000,005E)
Record number 184 (000000B8), 1 (0001) byte, RFA(0012,0000,00B6)
Record number 185 (000000B9), 33 (0021) bytes, RFA(0012,0000,00BA)
Record number 186 (000000BA), 33 (0021) bytes, RFA(0012,0000,00DE)
Record number 188 (000000BC), 1 (0001) byte, RFA(0012,0000,0124)
Record number 189 (000000BD), 127 (007F) bytes, RFA(0012,0000,0128)
Record number 190 (000000BE), 131 (0083) bytes, RFA(0012,0000,01AA)
Record number 193 (000000C1), 113 (0071) bytes, RFA(0013,0000,010C)
Record number 195 (000000C3), 59 (003B) bytes, RFA(0013,0000,01EC)
Record number 196 (000000C4), 1 (0001) byte, RFA(0014,0000,002A)
Record number 197 (000000C5), 35 (0023) bytes, RFA(0014,0000,002E)
Record number 198 (000000C6), 39 (0027) bytes, RFA(0014,0000,0054)
Record number 199 (000000C7), 65 (0041) bytes, RFA(0014,0000,007E)
Record number 200 (000000C8), 1 (0001) byte, RFA(0014,0000,00C2)
Record number 201 (000000C9), 55 (0037) bytes, RFA(0014,0000,00C6)
Record number 202 (000000CA), 55 (0037) bytes, RFA(0014,0000,0100)
Record number 203 (000000CB), 1 (0001) byte, RFA(0014,0000,013A)
Record number 204 (000000CC), 53 (0035) bytes, RFA(0014,0000,013E)
Record number 205 (000000CD), 51 (0033) bytes, RFA(0014,0000,0176)
Record number 206 (000000CE), 1 (0001) byte, RFA(0014,0000,01AC)
Record number 207 (000000CF), 57 (0039) bytes, RFA(0014,0000,01B0)
Record number 208 (000000D0), 1 (0001) byte, RFA(0014,0000,01EC)
Record number 210 (000000D2), 1 (0001) byte, RFA(0015,0000,002C)
Record number 211 (000000D3), 29 (001D) bytes, RFA(0015,0000,0030)
Record number 213 (000000D5), 1 (0001) byte, RFA(0015,0000,009A)
Record number 215 (000000D7), 75 (004B) bytes, RFA(0015,0000,00C4)
Record number 216 (000000D8), 75 (004B) bytes, RFA(0015,0000,0112)
Record number 217 (000000D9), 1 (0001) byte, RFA(0015,0000,0160)
Record number 218 (000000DA), 29 (001D) bytes, RFA(0015,0000,0164)
Record number 219 (000000DB), 55 (0037) bytes, RFA(0015,0000,0184)
Record number 221 (000000DD), 1 (0001) byte, RFA(0015,0000,01D6)
Record number 223 (000000DF), 89 (0059) bytes, RFA(0016,0000,0032)
Record number 225 (000000E1), 93 (005D) bytes, RFA(0016,0000,00C8)
Record number 226 (000000E2), 1 (0001) byte, RFA(0016,0000,0128)
Record number 228 (000000E4), 1 (0001) byte, RFA(0016,0000,0158)
Record number 229 (000000E5), 51 (0033) bytes, RFA(0016,0000,015C)
Record number 230 (000000E6), 51 (0033) bytes, RFA(0016,0000,0192)
Record number 231 (000000E7), 53 (0035) bytes, RFA(0016,0000,01C8)
Record number 232 (000000E8), 1 (0001) byte, RFA(0017,0000,0000)
Record number 233 (000000E9), 47 (002F) bytes, RFA(0017,0000,0004)
Record number 234 (000000EA), 1 (0001) byte, RFA(0017,0000,0036)
Record number 235 (000000EB), 35 (0023) bytes, RFA(0017,0000,003A)
Record number 236 (000000EC), 35 (0023) bytes, RFA(0017,0000,0060)
Record number 237 (000000ED), 1 (0001) byte, RFA(0017,0000,0086)
Record number 239 (000000EF), 1 (0001) byte, RFA(0017,0000,00E4)
Record number 242 (000000F2), 1 (0001) byte, RFA(0017,0000,0180)
Record number 243 (000000F3), 55 (0037) bytes, RFA(0017,0000,0184)
Record number 244 (000000F4), 43 (002B) bytes, RFA(0017,0000,01BE)
Record number 245 (000000F5), 1 (0001) byte, RFA(0017,0000,01EC)
Record number 246 (000000F6), 45 (002D) bytes, RFA(0017,0000,01F0)
Record number 247 (000000F7), 1 (0001) byte, RFA(0018,0000,0020)
Record number 249 (000000F9), 1 (0001) byte, RFA(0018,0000,0030)
Record number 250 (000000FA), 15 (000F) bytes, RFA(0018,0000,0034)
Record number 253 (000000FD), 13 (000D) bytes, RFA(0018,0000,0066)

Count 'em.  153.

So, what was it you were complaining?  VMS RMS doesn't have a count of the
RECORDED DATA BYTES in a file.  Now, I've offered you TWO views of a file's
size.  The ACTUAL file size (you persist on poo-pooing this) and the size of
data within the file.  Of course, you'll probably poo-poo that because it's
not accounting for the <LF> or the <CR><LF> but, as you can see, you've also
got the file's record count.  C'mon, that math's not tough.

OK.  I have *2* paying jobs that I should be devoting my time to, so I will
leave it here/there.
-- 
VAXman- A Bored Certified VMS Kernel Mode Hacker    VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.



More information about the Info-vax mailing list