IUPUI Revision History for DUMPER-32 JAH is James A. Harvey, IUPUI Computing Services, DEC Systems Group Edit Who Date Modules [IU-1] JAH 23-NOV-1987 DUMPER_ERROR, DUMPER_FILE Fix a bunch of problems involving messages using AD FAO directives. These directives require 2 arguments, not one, and the first argument is the length of the string (by value), and the second is the address of the string (not the other way around). [IU-2] JAH 23-NOV-1987 DUMPER_FILE, DUMPER_ERROR Symptom: DUMPER-32 blows up on an illegal record size error when trying to write a binary file which was written with a 36-bit byte size on the -20. User is then stuck with no way to get to the other files on the tape. Diagnosis: All 36-bit files are now assumed to be text files (DEC requested this behaviour from Stevens Institute), but the binary files are hitting RMS's record length limit (32765 bytes in this case). Cure: If the file is being written in "FILE_TYPE_7BIT_CHARACTERS" (i.e., text) mode, check the current record size against RMS's maximum in FILE_WRITE_CHARACTER. If it is equal (or too big), output a message (if we haven't already), truncate the record to the maximum size, dump the buffer, and continue. [IU-3] JAH 24-NOV-1987 DUMPER_DUMPER_TAPE, DUMPER_TAPE_IO Add code to DUMPER_SKIP_SAVE_SET that works with labeled DUMPER tapes. [IU-4] JAH 25-NOV-1987 DUMPER_TAPE_IO SKIP_FILES_LABELED does not provide a filename descriptor when it does the QIOW to access the required file. The IOSB returns the warning "%SYSTEM-W-BADFILENAME, bad file name syntax", which some callers take to mean that it failed. Fix it (provide the name descriptor as the P2 argument). [IU-5] JAH 25-NOV-1987 DUMPER_TAPE_IO Skipping forward at EOT on a labeled tape, using the filespec *.*;*, produces the most bizarre behaviour under VMS. It rewinds to BOT! So, in SKIP_FILES_LABELED, after skipping, if the tape file number in the FIB is not what we expect, return SS$_ENDOFTAPE if skipping forward, else SS$_BEGOFTAPE. [IU-6] JAH 14-DEC-1987 DUMPER_ERROR, DUMPER_TAPE_IO Add informative messages to NEXT_TAPE_LABELED so that the user knows when a volume switch is going on. [IU-7] JAH 14-DEC-1987 DUMPER, DUMPER_FILE Add a qualifier /REMOVE_LSNS, which causes line sequence numbers to be stripped when restoring files of type FILE_TYPE_7BIT_CHARACTERS. The default is /REMOVE_LSNS; /NOREMOVE_LSNS may be given to restore the pre- vious behavior of DUMPER-32. The way this works is as follows: If the /REMOVE_LSNS qualifier has been given, and the file type is FILE_- TYPE_7BIT_CHARACTERS, then CVT_FILE_DATA in DUMPER_FILE fetches characters by calling CVT_FETCH_7BIT_CHARACTER with the LSN_FLAG argument set to TRUE. FILE_WRITE_CHARACTER will discard all leading nulls in records (line sequence numbered files are always padded with nulls after a carriage-return linefeed sequence to the next 36-bit word boundary). When the record buffer contains exactly five characters, FILE_WRITE_- CHARACTER will check the fifth character to determine whether it has the line number bit on (CVT_FETCH_7BIT_CHARACTER will stored it in the most significant bit of an 8-bit byte). If it does, the buffer pointer and count are reset, effectively removing the line number and the tab that follows (or the EDIT "page-mark", five blanks in a word with the line number bit turned on, followed by a formfeed). The user is warned once per file when line numbers are being removed if any are removed. [IU-8] JAH 15-DEC-1987 DUMPER, DUMPER_DUMPER_TAPE, DUMPER_BACKUP_TAPE Add /BINARY qualifier to force "binary" restore so we always have a way to get all of the bits from the tape into a disk file. This creates a file with variable length records, maximum record size 510 bytes, with no carriage control. A 36-bit word is stored with 5 seven-bit fields stored right-justified in 5 successive 8-bit bytes. The fifth byte contains the least significant bit of the 36-bit word in its most significant bit (this basically is a way of forcing the file to be written in DUMPER-32's FILE_36BIT_DATA mode, which was lost when DEC requested that all of these files be written text files, i.e., in the FILE_7BIT_CHARACTERS mode). [IU-9] JAH 16-DEC-1987 DUMPER_BACKUP_TAPE Fix CVT_BACKUP_FILE_TYPE so that *something* is set up for the file type for pre-7.03 tapes if the byte size is not one of 0, 7, 8 or 36. Added an OTHERWISE clause to a SELECTONE statement similar to the code in CVT_DUMPER_FILE_TYPE in DUMPER_DUMPER_TAPE that handles the same case. [IU-10] JAH 16-DEC-1987 DUMPER_TAPE_IO Fix NEXT_TAPE_LABELED so that value of IOSB status is loaded and returned rather than the address of where it is (added missing "."). [IU-11] JAH 16-DEC-1987 DUMPER_DRIVER In LIST_SAVE_SET, if the READ_RECORD routine returns FALSE, do not consider it a fatal error. The read-record routine for DUMPER format tapes returns FALSE for filler records and continued-saveset records to indicate that they can be ignored. This was causing LISTs of DUMPER tapes to die with a "Message 00000000" error after a volume switch or when a filler record showed up on the tape. [IU-12] JAH 16-DEC-1987 DUMPER_DUMPER_TAPE Make DUMPER_PROCESS_DATA ignore continued-saveset records and file header records with PG.CON (DUMPER_F1) lit in the page count word (these aren't really file headers, DUMPER writes one after a continued-saveset record to let you know that it was in the middle of a file on the previous reel). Also make DUMPER_PROCESS_FILE ignore file header records with PG.CON lit. The absence of these tests was making DUMPER-32 blow up when restoring across a volume switch. [IU-13] JAH 16-DEC-1987 DUMPER_DUMPER_TAPE When missing a file trailer record in DUMPER_PROCESS_DATA, close the currently open file before returning an error. Otherwise any subsequent opens will fail. [IU-14] JAH 16-DEC-1987 DUMPER_DRIVER Redo RESTORE_FILE somewhat so that it ignores records it is suppose to ignore and doesn't try to treat them as data (i.e., filler records, action after tape volume switch, etc.). [IU-15] JAH 05-JAN-1988 DUMPER_DUMPER_TAPE Symptom: DUMPER-32 tries to list the FDB information in bogus file header records that DUMPER sticks in after a continued saveset record. The FDB infomation listed is garbage. Diagnosis: Version 6 of DUMPER writes the bogus FILEST (file header) record with PG.CON on (DUMPER_F1 to DUMPER-32). It also lights PG.NFN and may leave out the filename information, so we can't count on having it. Cure: In DUMPER_LIST_RECORD, if the type of the record is a file header, and both DUMPER_F1 and the DUMPER_F2 flags are on, simply return after listing the "file continued from previous reel" message. [IU-16] JAH 05-JAN-1988 DUMPER_DUMPER_TAPE Make DUMPER_LIST_RECORD say something about continued saveset records. It now outputs a header giving the tape number, saveset name, tape type, etc., much like for a saveset header. This is convenient for determining what tape a file is on without having to go back to a DUMPER-20 listing of the tape volume set. [IU-17] JAH 05-JAN-1988 DUMPER, DUMPER_DUMPER_TAPE, DUMPER_BACKUP_TAPE DUMPER-32 has some interrelated problems with the /SSNAME and /SKIP quali- fiers, and an unecessary restriction that prevents a user from starting a list or restore at the beginning of a continued saveset (a real time-saver for, say, a 4-reel saveset when you know the file that you want is on the 4th reel). These problems are all fixed with this one edit since they are interrelated. Symptoms: 1. Giving a saveset name seems to do exactly the opposite of what the user intended. For example, a restore explicitly specifying a saveset name restores the first saveset found if the name DOES NOT match the name specified. 2. The xxxxxx_SKIP_SAVE_SET routines sometimes do not skip as they are supposed to and return a bogus error code of zero. 3. DUMPER-32 does not allow a user to start a list or restore at the beginning of a tape that starts with a continued saveset record. Diagnoses: 1. The xxxxxx_CHECK_SAVE_SET_RECORD routines seem to be written assuming STR$COMPARE_EQL returns TRUE (1) for a match, and FALSE (0) for no match, when in reality the exact opposite is true. Also, quotes from the /SSNAME qualifier are left in the value stored. These will never compare correctly unless quotes are explicitly included in the saveset name when writing the tape. For example, if the user ran DUMPER on the -20 and gave the save set name as: DUMPER>SSNAME FULL SAVE OF CS STRUCTURE i.e., an non-quoted string with embedded spaces, then there is no way to ever get it to match in DUMPER-32, assuming that the aforementioned comparison bug did not exist. This is because giving the /SSNAME qualifier to DUMPER-32 as /SSNAME="FULL SAVE OF CS STRUCTURE" stores the quotes. The strings will not compare equal because the name in the saveset record does not contain quotes, and the name stored as the qualfier value always will (if the name contains embedded spaces, there is no way to specify it to DUMPER-32 without the quotes). Finally, the string library routine used does a case-sensitive comparison. 3. The xxxxxx_SKIP_SAVE_SET routines call the xxxxxx_CHECK_SAVE_SET_- RECORD routines to check the record type. These routines return FALSE if the record is a save set header, but the save set name did not match (actually, did match, see dignosis 1) that given by the /SSNAME qualifier. The xxxxxx_SKIP_SAVE_SET routines erroneously treat this FALSE return as an error. 4. Right now, DUMPER-32 requires a save set header record to be read before anything will be restored or listed. Cures: 1. Make a global routine in DUMPER.BLI, MATCH_SSNAME, to compare saveset names. Call this from all the xxxxxx_CHECK_SAVE_SET_- RECORD routines. Also call it to see if /SSNAME=ALL was given. Use STR$COMPARE_MULTI to get a case-insensitive comparison, and interpret the results correctly (i.e., 0 = match). Also, if the value of /SSNAME qualifier that was given was surrounded by quotes, check both the quoted and unquoted values of the qualifier against the saveset name passed. 2. Make xxxxxx_SKIP_SAVE_SET routines simply check the record type rather than calling xxxxxx_CHECK_SAVE_SET_RECORD. These routines reside in the same modules for each tape format, and the extra overhead of extracting saveset names and comparing them is un- necessary in this case. Also, this allows us to fix the problem (3) (see next item). 3. Make xxxxxx_CHECK_SAVE_SET_RECORD routines consider continuation headers as well as beginning-of-saveset headers. This way, /LIST and restores can be done with subsequent reels when all reels are not available, and /SKIP still works because of the fix to (2). [IU-18] JAH 05-JAN-1988 DUMPER_FILE FILE_CLOSE strips trailing nulls off the last record before closing the file. It shouldn't do this unless the file is a text file, i.e., FILE_TYPE is FILE_TYPE_7BIT_CHARACTERS. Zero has no special meaning as binary data, it is as valid as any other byte. [IU-19] JAH 08-JAN-1988 DUMPER_FILE The stuff added by edits IU-2 (keep DUMPER from blowing up when restoring binary files as text files) and IU-7 (remove EDIT/SOS lines sequence numbers by default when restoring text files) causes confusion sometimes. For example, the stuff added by IU-7 will claim that LSNs are being removed from an EXE file. Redo these edits to simply remember what was done and output a single error message when the file is closed. [IU-20] JAH 08-JAN-1988 DUMPER_DRIVER DUMPER-32 now handles a volume switch on a TOPS-20 DUMPER tape OK if it is restoring a file and the file is continued across the volume switch, but it still barfs if it is simply searching for a saveset or file when the volume switch occurs. Add code to DRIVER_PROCESS_COMMAND and RESTORE_SAVE_SET to handle volume switches. Also fix more problems with DUMPER exiting with a status of FALSE. [IU-21] JAH 12-JAN-1988 DUMPER.CLD Change the name of the /CREATEDIRECTORY qualifier to /CREATE_DIRECTORY. [IU-22] JAH 15-JAN-1988 DUMPER_DRIVER More problems with .STATUS EQL FALSE. The read record routines return a status equal to FALSE if the read was successful, but the record to be read should be ignored. This results in a lot of arcane code in DUMPER_DRIVER (well, it's FALSE so we have an error right - no - it's equal to FALSE so it's not an error, so let's process it - but no, it's equal to FALSE so we should ignore it, right??? Acck. Phtth). One more time we rewrite the loops in DUMPER_DRIVER. I'm going to get volume switches to work with labeled DUMPER tapes from TOPS-20 if it kills me. God only knows if it still works with BACKUP tapes, but at this point I really don't care anymore... [IU-23] JAH 15-JAN-1988 DUMPER_DRIVER, DUMPER_DUMPER_TAPE, DUMPER_BACKUP_TAPE Edit IU-3 wasn't quite enough. Make DUMPER-32 handle backward skips on labeled DUMPER tapes and unlabeled DUMPER tapes that have EOF marks between each saveset. Make DUMPER_SKIP_SAVESET do volume switches if it has to, if skipping in the forward direction. Ensure that /SKIP=0, if given for a labeled tape, positions to the beginning of the current saveset. [IU-24] JAH 15-JAN-1988 DUMPER.CLD Clean up the CLD file by disallowing things that don't make sense, or are currently accepted but don't do what you expect (e.g., /NOSELECT), etc. [IU-25] JAH 15-JAN-1988 DUMPER_DRIVER, DUMPER_DUMPER_TAPE, DUMPER_BACKUP_TAPE Savesets are skipped on DUMPER and DUMPER INTERCHANGE tapes by grinding over records on the tape and examining each one to see if it a saveset header record. The skip code increments the count of saveset header records to skip because the code is assuming that the tape is positioned immediately before a saveset header record. This isn't always true. The skip saveset code is called in two places: once to do the skip for the /SKIP qualifier, and once when looking for savesets in order to skip over a saveset we don't want. In the first case, the tape could be positioned anywhere, and we have no current record. In the second case, we have just read a saveset header, but it is not a saveset that we want. The end result of all this is that the /SSNAME qualifier, when used with a DUMPER or DUMPER INTERCHANGE tape, skips an extra saveset after each one it doesn't want. Fix this by making the skip saveset code for DUMPER and DUMPER INTERCHANGE format assume that if a record address is passed that it doesn't have to do the hokey fudging of the number to skip. [IU-26] JAH 17-JAN-1988 DUMPER_DUMPER_TAPE Make DUMPER_PROCESS_FILE return the condition DMPR_END_OF_SAVE_SET if a tape trailer is encountered. This is important as otherwise we lose the position on a labeled DUMPER tape when we read off the end of the tape after the last saveset. [IU-27] JAH 19-JAN-1988 DUMPER_DRIVER, DUMPER_DUMPER_TAPE More fixes for labeled DUMPER tapes and DUMPER tapes with file marks between the savesets. [IU-28] JAH 20-JAN-1988 DUMPER_TAPE_IO, ? Backward skips on labeled tapes just don't work. SKIP_FILES_LABELED tries to skip backwards on the tape by deaccessing the current file and then accessing the file with the previous file identification number, but this just doesn't work. I tried to fix it, that doesn't work either. I can't figure out how to make it work and am giving it up for now. This edit is a bunch of crud I did trying to fix it. It doesn't work, but it doesn't work any worse than it used to so I'm leaving it in... [IU-29] JAH 20-JAN-1988 DUMPER_FILE, DUMPER_ERROR.MSG Directory creations aren't being logged. Log them if the user specified /LOG=ALL or /LOG=DIRECTORIES.