File: VDPOEL.WU of Tape: Sources/Other/new-17
(Source file text)
DROP - RECOVR - COPCOM This note describes 3 programs developed in Prof. W. L. van der Poel's laboratory at the Technical University in Delft which were distributed with- out documentation at the '78 European DECUS meeting in Copenhagen. The three programs: DROP, RECOVR and COPCOM, provide a method for restoring 'lost' di- rectories or creating files from block-number specifications. They were of- fered on an 'as is' basis with some precautions, but even in this form, have an obvious utility. DROP will scan an entire mass-storage device seeking clues to the nature of the files it contains. Thus if you lose the directory on a valuable tape and do not have a recent listing, DROP can be used to give you at least some idea of the files present. The program recognizes, for instance, .BN and .SV files, and in the later case, uses the CCB to suggest a likely candidate, ie PIP or ABSLDR or some other system program. Of course it does not know about any of your own special programs, but will list the starting address and the core locations used, which is often sufficient. In the case of ASCII files, DROP will print the first 60 characters (sans all Carriage Returns and Line- feeds), which again is usually enough to identify the file. Given the start- ing block and the length, you can then copy it with the RECOVR program. DROP asks at the end: 'WRITE DIRECTORY?'. Respond -only- with 'NO' (or with just a carriage return). This option has not been properly implemented! EX: .R DROP *{output device <} {input device} defaults: TTY: DSK: RECOVR and COPCOM allow you to move or examine files specified by loca- tion rather than by name. Obviously when you lose the directory this is the only way to access such files, but this is also convenient for quickly copy- ing a program to disk which is only a few blocks away from a file you have just read near the end of a tape. RECOVR uses the '=N' option to indicate both the -number- of blocks as well as the -starting block- for the transfer Relative references can be used, i.e. 'start 10 blocks after file XXXX.PA'. The 4 low-order digits of N specify the location, and any high-order digits, the number of blocks. All numbers are in OCTAL! EX: .R RECOVR *{odev:filename <} {idev:}{filename}=bbbbllll defaults: TTY: SYS: (none) #blks|loc. Note that you must always specify a 4-digit value for the location. If a file name is given, the location is relative to that file, otherwise not. Omitting the output device allows you to simply examine various areas before you copy them. Hopefully you have a video terminal, rather than a hard-copy device, for this purpose! COPCOM will either -copy- or -compare- two file areas using only their location and length. (If the areas are in fact named files, OCOMP is a much better utility for comparisons, largely because of the superior output for- mat, and then there is EPIC...) COPCOM uses the '=N' option only to specify the -number- of blocks to copy (or compare). The starting block is cleverly decoded from the 'filename' specification, i.e. 'RXA1:70' is interpreted as 'block 70 on floppy number 1' (the start of file storage on a system device) This applies to the -output specification- as well, so you can do 'block-to- block' copies if you wish (you had better know what you are doing, however!) Specifying the '/F' (file) switch returns you to the normal output filename interpretation so you can copy (as with RECOVR) any number of blocks into a named file. The '/C' switch specifies 'copy' instead of 'compare' (both be- gin with 'C', so you will just have to remember this one!) although it would seem that the program should be able to distinguish between these operations from the number of input 'files' specified. The comparison feature is quite useful after a directory crash when attempting to match files with those on another device. Use the '/B' option in DIRECT to get a list of locations. EX: .R COPCOM copy *{odev:}location < {idev:} location /C=N copy *{odev:}filename < {idev:} location /C/F=N compare *{odev:} {file} < {dev1:} loc1, {dev2} loc2 =N COPCOM has been used to copy several 'stranger' (non-DEC) floppies into OS/8 files using a byte-mode floppy handler (Newsletter #29, p15), and then comparing them with OCOMP. This would also be a convenient way to copy all or part of a PDP11 floppy to an OS/8 file, or vice versa (ibid. #30, p7).