  $ IUPUI Revision History for DUMPER-32  C JAH is James A. Harvey, IUPUI Computing Services, DEC Systems Group    Edit		Who	Date		Modules   1 [IU-1]		JAH	23-NOV-1987	DUMPER_ERROR, DUMPER_FILE J Fix a bunch of problems involving messages using AD FAO directives.  TheseF directives require 2 arguments, not one, and the first argument is theE length of the string (by value), and the second is the address of the " string (not the other way around).  1 [IU-2]		JAH	23-NOV-1987	DUMPER_FILE, DUMPER_ERROR J Symptom: DUMPER-32 blows up on an illegal record size error when trying toI write a binary file which was written with a 36-bit byte size on the -20. E User is then stuck with no way to get to the other files on the tape. K Diagnosis: All 36-bit files are now assumed to be text files (DEC requested H this behaviour from Stevens Institute), but the binary files are hittingK RMS's record length limit (32765 bytes in this case).  Cure: If the file is I being written in "FILE_TYPE_7BIT_CHARACTERS" (i.e., text) mode, check the I current record size against RMS's maximum in FILE_WRITE_CHARACTER.  If it I 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_IOF Add code to DUMPER_SKIP_SAVE_SET that works with labeled DUMPER tapes.  & [IU-4]		JAH	25-NOV-1987	DUMPER_TAPE_IOF SKIP_FILES_LABELED does not provide a filename descriptor when it doesC the QIOW to access the required file.  The IOSB returns the warning F "%SYSTEM-W-BADFILENAME, bad file name syntax", which some callers takeF to mean that it failed.  Fix it (provide the name descriptor as the P2
 argument).  & [IU-5]		JAH	25-NOV-1987	DUMPER_TAPE_IOD Skipping forward at EOT on a labeled tape, using the filespec *.*;*,B produces the most bizarre behaviour under VMS.  It rewinds to BOT!B So, in SKIP_FILES_LABELED, after skipping, if the tape file numberB in the FIB is not what we expect, return SS$_ENDOFTAPE if skipping forward, else SS$_BEGOFTAPE.  4 [IU-6]		JAH	14-DEC-1987	DUMPER_ERROR, DUMPER_TAPE_IOI 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 F Add a qualifier /REMOVE_LSNS, which causes line sequence numbers to beE stripped when restoring files of type FILE_TYPE_7BIT_CHARACTERS.  The H default is /REMOVE_LSNS; /NOREMOVE_LSNS may be given to restore the pre-C vious behavior of DUMPER-32.  The way this works is as follows:  If F the /REMOVE_LSNS qualifier has been given, and the file type is FILE_-J TYPE_7BIT_CHARACTERS, then CVT_FILE_DATA in DUMPER_FILE	fetches charactersE by calling CVT_FETCH_7BIT_CHARACTER with the LSN_FLAG argument set to E TRUE.  FILE_WRITE_CHARACTER will discard all leading nulls in records B (line sequence numbered files are always padded with nulls after aD carriage-return linefeed sequence to the next 36-bit word boundary).E When the record buffer contains exactly five characters, FILE_WRITE_- D CHARACTER will check the fifth character to determine whether it hasF the line number bit on (CVT_FETCH_7BIT_CHARACTER will stored it in theK most significant bit of an 8-bit byte).  If it does, the buffer pointer and F count are reset, effectively removing the line number and the tab thatE follows (or the EDIT "page-mark", five blanks in a word with the line B number bit turned on, followed by a formfeed).  The user is warnedE once per file when line numbers are being removed if any are removed.   3 [IU-8]		JAH	15-DEC-1987	DUMPER, DUMPER_DUMPER_TAPE,  					DUMPER_BACKUP_TAPE G Add /BINARY qualifier to force "binary" restore so we always have a way K to get all of the bits from the tape into a disk file.  This creates a file D with variable length records, maximum record size 510 bytes, with noI carriage control.  A 36-bit word is stored with 5 seven-bit fields stored I right-justified in 5 successive 8-bit bytes.  The fifth byte contains the D least significant bit of the 36-bit word in its most significant bitI (this basically is a way of forcing the file to be written in DUMPER-32's I FILE_36BIT_DATA mode, which was lost when DEC requested that all of these E files be written text files, i.e., in the FILE_7BIT_CHARACTERS mode).   * [IU-9]		JAH	16-DEC-1987	DUMPER_BACKUP_TAPEH Fix CVT_BACKUP_FILE_TYPE so that *something* is set up for the file typeG for pre-7.03 tapes if the byte size is not one of 0, 7, 8 or 36.  Added C an OTHERWISE clause to a SELECTONE statement similar to the code in F CVT_DUMPER_FILE_TYPE in DUMPER_DUMPER_TAPE that handles the same case.  ' [IU-10]		JAH	16-DEC-1987	DUMPER_TAPE_IO I 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_DRIVERK In LIST_SAVE_SET, if the READ_RECORD routine returns FALSE, do not consider J it a fatal error.  The read-record routine for DUMPER format tapes returnsG FALSE for filler records and continued-saveset records to indicate that H they can be ignored.  This was causing LISTs of DUMPER tapes to die withH 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 I Make DUMPER_PROCESS_DATA ignore continued-saveset records and file header H records with PG.CON (DUMPER_F1) lit in the page count word (these aren'tJ really file headers, DUMPER writes one after a continued-saveset record toG let you know that it was in the middle of a file on the previous reel). I Also make DUMPER_PROCESS_FILE ignore file header records with PG.CON lit. F 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 D When missing a file trailer record in DUMPER_PROCESS_DATA, close theH currently open file before returning an error.  Otherwise any subsequent opens will fail.  & [IU-14]		JAH	16-DEC-1987	DUMPER_DRIVERF Redo RESTORE_FILE somewhat so that it ignores records it is suppose toJ 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 I Symptom: DUMPER-32 tries to list the FDB information in bogus file header H records that DUMPER sticks in after a continued saveset record.  The FDBH infomation listed is garbage.  Diagnosis: Version 6 of DUMPER writes theJ bogus FILEST (file header) record with PG.CON on (DUMPER_F1 to DUMPER-32).G It also lights PG.NFN and may leave out the filename information, so we F can't count on having it.  Cure: In DUMPER_LIST_RECORD, if the type ofG the record is a file header, and both DUMPER_F1 and the DUMPER_F2 flags K are on, simply return after listing the "file continued from previous reel"  message.  + [IU-16]		JAH	05-JAN-1988	DUMPER_DUMPER_TAPE F Make DUMPER_LIST_RECORD say something about continued saveset records.H It now outputs a header giving the tape number, saveset name, tape type,I etc., much like for a saveset header.  This is convenient for determining G what tape a file is on without having to go back to a DUMPER-20 listing  of the tape volume set.   4 [IU-17]		JAH	05-JAN-1988	DUMPER, DUMPER_DUMPER_TAPE, 					DUMPER_BACKUP_TAPE J DUMPER-32 has some interrelated problems with the /SSNAME and /SKIP quali-I fiers, and an unecessary restriction that prevents a user from starting a J list or restore at the beginning of a continued saveset (a real time-saverI for, say, a 4-reel saveset when you know the file that you want is on the J 4th reel).  These problems are all fixed with this one edit since they are
 interrelated.   	 Symptoms:   A 1.	Giving a saveset name seems to do exactly the opposite of what A 	the user intended.  For example, a restore explicitly specifying A 	a saveset name restores the first saveset found if the name DOES  	NOT match the name specified.  F 2.	The xxxxxx_SKIP_SAVE_SET routines sometimes do not skip as they are3 	supposed to and return a bogus error code of zero.   D 3.	DUMPER-32 does not allow a user to start a list or restore at theA 	beginning of a tape that starts with a continued saveset record.   
 Diagnoses:  ? 1.	The xxxxxx_CHECK_SAVE_SET_RECORD routines seem to be written A 	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. A 	For example, if the user ran DUMPER on the -20 and gave the save 
 	set name as: ( 	DUMPER>SSNAME FULL SAVE OF CS STRUCTUREF 	i.e., an non-quoted string with embedded spaces, then there is no wayG 	to ever get it to match in DUMPER-32, assuming that the aforementioned B 	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 theD 	name stored as the qualfier value always will (if the name contains< 	embedded spaces, there is no way to specify it to DUMPER-32D 	without the quotes).  Finally, the string library routine used does 	a case-sensitive comparison.   E 3.	The xxxxxx_SKIP_SAVE_SET routines call the xxxxxx_CHECK_SAVE_SET_- A 	RECORD routines to check the record type.  These routines return @ 	FALSE if the record is a save set header, but the save set nameB 	did not match (actually, did match, see dignosis 1) that given by: 	the /SSNAME qualifier.  The xxxxxx_SKIP_SAVE_SET routines1 	erroneously treat this FALSE return as an error.   D 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.   B 2.	Make xxxxxx_SKIP_SAVE_SET routines simply check the record typeB 	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- A 	necessary in this case.  Also, this allows us to fix the problem  	(3) (see next item).   C 3.	Make xxxxxx_CHECK_SAVE_SET_RECORD routines consider continuation B 	headers as well as beginning-of-saveset headers.  This way, /LISTB 	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_FILEG FILE_CLOSE strips trailing nulls off the last record before closing the K file.  It shouldn't do this unless the file is a text file, i.e., FILE_TYPE J 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_FILEI The stuff added by edits IU-2 (keep DUMPER from blowing up when restoring D binary files as text files) and IU-7 (remove EDIT/SOS lines sequenceI numbers by default when restoring text files) causes confusion sometimes. K For example, the stuff added by IU-7 will claim that LSNs are being removed H from an EXE file.  Redo these edits to simply remember what was done and6 output a single error message when the file is closed.  & [IU-20]		JAH	08-JAN-1988	DUMPER_DRIVERJ DUMPER-32 now handles a volume switch on a TOPS-20 DUMPER tape OK if it isK restoring a file and the file is continued across the volume switch, but it K still barfs if it is simply searching for a saveset or file when the volume J switch occurs.  Add code to DRIVER_PROCESS_COMMAND and RESTORE_SAVE_SET toJ handle volume switches.  Also fix more problems with DUMPER exiting with a status of FALSE.  # [IU-21]		JAH	12-JAN-1988	DUMPER.CLD G Change the name of the /CREATEDIRECTORY qualifier to /CREATE_DIRECTORY.   & [IU-22]		JAH	15-JAN-1988	DUMPER_DRIVERF More problems with .STATUS EQL FALSE.  The read record routines returnH 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 inE DUMPER_DRIVER (well, it's FALSE so we have an error right - no - it's G equal to FALSE so it's not an error, so let's process it - but no, it's I equal to FALSE so we should ignore it, right???  Acck.  Phtth).  One more D time we rewrite the loops in DUMPER_DRIVER.  I'm going to get volumeC switches to work with labeled DUMPER tapes from TOPS-20 if it kills D 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 G Edit IU-3 wasn't quite enough.  Make DUMPER-32 handle backward skips on C labeled DUMPER tapes and unlabeled DUMPER tapes that have EOF marks H between each saveset.  Make DUMPER_SKIP_SAVESET do volume switches if itF has to, if skipping in the forward direction.  Ensure that /SKIP=0, ifL given for a labeled tape, positions to the beginning of the current saveset.  # [IU-24]		JAH	15-JAN-1988	DUMPER.CLD I Clean up the CLD file by disallowing things that don't make sense, or are G 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 G Savesets are skipped on DUMPER and DUMPER INTERCHANGE tapes by grinding F over records on the tape and examining each one to see if it a savesetD header record.  The skip code increments the count of saveset headerH records to skip because the code is assuming that the tape is positionedD immediately before a saveset header record.  This isn't always true.F The skip saveset code is called in two places: once to do the skip forH the /SKIP qualifier, and once when looking for savesets in order to skipC over a saveset we don't want.  In the first case, the tape could be H positioned anywhere, and we have no current record.  In the second case,I we have just read a saveset header, but it is not a saveset that we want. H The end result of all this is that the /SSNAME qualifier, when used withJ a DUMPER or DUMPER INTERCHANGE tape, skips an extra saveset after each oneI it doesn't want.  Fix this by making the skip saveset code for DUMPER and H 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 G Make DUMPER_PROCESS_FILE return the condition DMPR_END_OF_SAVE_SET if a H tape trailer is encountered.  This is important as otherwise we lose theF 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_TAPED More fixes for labeled DUMPER tapes and DUMPER tapes with file marks between the savesets.   * [IU-28]		JAH	20-JAN-1988	DUMPER_TAPE_IO, ?J Backward skips on labeled tapes just don't work.  SKIP_FILES_LABELED triesF to skip backwards on the tape by deaccessing the current file and thenI accessing the file with the previous file identification number, but this I just doesn't work.  I tried to fix it, that doesn't work either.  I can't I figure out how to make it work and am giving it up for now.  This edit is H a bunch of crud I did trying to fix it.  It doesn't work, but it doesn't6 work any worse than it used to so I'm leaving it in...  6 [IU-29]		JAH	20-JAN-1988	DUMPER_FILE, DUMPER_ERROR.MSGH Directory creations aren't being logged.  Log them if the user specified /LOG=ALL or /LOG=DIRECTORIES. 