Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!ames!ucbcad!ucbvax!rca.com!EVERHART%ARISIA From: EVERHART%ARISIA@rca.com ("GLENN EVERHART, 609 486 6328") Newsgroups: mod.computers.vax Subject: Corrupt VMS Accounting file... Message-ID: <8701130542.AA00281@ucbvax.Berkeley.EDU> Date: Mon, 12-Jan-87 08:55:00 EST Article-I.D.: ucbvax.8701130542.AA00281 Posted: Mon Jan 12 08:55:00 1987 Date-Received: Tue, 13-Jan-87 06:45:10 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 35 Approved: info-vax@sri-kl.arpa Re the message of a disk failure corrupting ACCOUNTNG.DAT and making the data beyond the faulted section inaccessible... This kind of clobbering can be repaired but needs some hand work to do so. The file in question is variable record length sequential, so the data is in the form <2 bytes of record size> records. Such a file is read by grabbing the record size and then using it to get the data AND locate the start of the next record. Once the record size is out of sync, anywhere along the file, the system is unlikely to be able to get back into sync, since it will try to use random data bytes as record size. The way to patch this is with a file patcher (just about any one will do) that treats the file NOT as a sequential file, but as a set of blocks. (I tend to use DDT22 since I am familiar with it; patch could work too or lots of others that have appeared in DECUS circles over the years). You then find the block before the bad one and note its' last record count (since the last part of its record will be in the corrupted block). Now you have to build dummy records (or at least the record size words) in the bad block so the chain will be unbroken. To find how many bytes long to make the last you need to look in the next virtual block of the file to see how far in the next size word is. Doing this is simplest for text files where the size words appear as incongruous control characters among readable text. For a file like ACCOUNTNG.DAT the recognition will be harder (you'll have to find the internal format of the file documented somewhere or stare hard...) but it should be possible. In fact a dump of mine looks like the record size is fairly clear... You'll wind up with a few records of garbage by this procedure BUT the whole file will be readable. The only thing really important for this is that the chain of record sizes MUST be relinked (and hopefully you'll not make any record sizes longer than the utilities can handle... my dir/full says 159 bytes is the max...) Glenn Everhart Everhart%Arisia@rca.com 609 486 6328