> the mere act of reading files can change the file type, > leading to corruption of the data when viewed or edited. The original > file type was Sequential, Variable, Carriage return carriage control. > The type gets munged from Variable to Stream
Actually, you just have discovered some quite alarming bug... Samba-VMS sometimes changes Variable-record files to Stream files (Pathworks does that too). This change is supposed to be done only when the variable-record file is modified and then re-written by some utility on the PC side (such as Wordpad, Notepad, ...). It does that because when rewriting the file, it writes a stream-structured information, so you must do that if you want the file to be readable afterwards. The problem is that sometimes some other utility opens the file in write mode but never writes anything in the file. It seems that the Linux smbfs stuff does that a lot. However, you can reproduce the same problem with a Windows XP PC by right-clicking "Properties" on a file on a read/write share. For some unknown reason, this action opens the file in write mode, so changes the "variable" to "stream", but does not write anything in the file itself. Such unexpected behaviour may happen with other kind of PC clients. I plan to do additional analysis and hopefully fixing of this problem as soon as possible. In the meantime, I have posted on the usual URL (http://www.pi-net.dyndns.org/anonymous/jyc/) a file names PATCH-VAR-STM.ZIP (at the bottom of the page), which contains a backup save-set containing a (speedy) correction. This correction stops all changes from VAR to STREAM. Notepad or Wordpad changes of VAR files will not work anymore, but at least it prevents unwanted changes. To apply that patch, please do the following : - Unzip the file, then BACKUP/RESTORE the resulting BCK. You'll get 2 files, named STM_READ.OBJ and STM_READ.C. The C file is not really useful. - Put the STM_READ.OBJ in the SAMBA.OLB library, which is situated in the [.SOURCE.BIN] area ($ LIB [.BIN]SAMBA.OLB STM_READ.OBJ) - Relink SMBD, by executing "@[.SOURCE.VMS]LINK.COM NODEBUG SMBD" - Copy the resulting new [.SOURCE.BIN]SMBD.EXE file into the SAMBA_ROOT:[BIN] area - Stop all SMBD_* processes. I am really sorry about that problem, and I just can't understand that neither me nor other people using Samba-VMS has not seen it before. Note, however, that there is no harm done to the data inside the file. In the case of erroneous structure change, the harm can be undone by executing SET FILE/ATTR=RFM:VAR for that file. PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING: http://www.catb.org/~esr/faqs/smart-questions.html