***› DOS WIZARD› by Gary C. Crider› For XL/XE-use TRANSLATOR progam before› running DOSWIZ.OBJ on this OHAUG disk!› PART A of DOCS! › › DANGER! IT IS IMPORTANT THAT YOU› UNDERSTAND WHAT YOU ARE DOING BEFORE› YOU USE DOS WIZARD. › DOSWIZ was written to accomplish› several tasks that no other disk› utility seemed to address. Some of› these are listed below. Some› knowledge of DOS file structures is› assumed. There are many good tutorials› on DOS available . It may become one› of your handiest utilities, but also› most potentially dangerous if you› don't understand what you are doing!›› PLEASE READ THIS DOCUMENTATION› THOROUGHLY!›› VANISHING SECTORS?› 1. RECOVERING THE SECTORS THAT JUST› SEEM TO VANISH FROM DOS DISKS. When a› directory listing is produced, the sum› of all file sectors plus the remaining› free sectors should total 707. You› have probably noticed that this is not› always true. The primary cause for› this is pressing SYSTEM RESET while a› file is open for output. This leaves› the directory entry marked open and› the file and its associated sectors› are forever lost to DOS.› Prior to DOS WIZ the only way to› reclaim the sectors was to copy all› good files to another disk, reformat› the bad disk and selectively copy each› good file back to the reformatted› diskette.› DOS WIZ will read all files while› noting the sectors used by the files.› Any sector not referenced by a file› entry will be freed into the available› sectors pool and all open file› directory entries will be released for› reuse.›› ERROR's 144, OR 164?› 2. You probably have received the› notorious ERROR 164 or ERROR 144 at› one time or another when trying to› read a disk file. Sometimes you can't› even delete a file because DOS wants a› valid file chain before it will› delete. › All sectors used by a DOS file are› chained together, that is, a sector of› data has a pointer to the next sector› belonging to that file. Also on each› sector is a reference to the file› which owns it. ERROR 164 indicates› that a sector was pointed to by a› prior sector, but the two sectors do› not reference the same file. This› means that somehow another file used a› sector belonging to the file in› question.› ERROR 144 generally indicates that› a sector has for some reason become› unreadable. This can also be the› indicated by some other error codes. › In either case, the integrity of the› file chain is lost and DOS will not be› able to read the file. Usually there› is nothing that can be done because a› binary load file or a tokenized BASIC› file that is not complete will not be› usable in any fashion. ›› FILE RECOVERY?› However, recovering a portion of a› data file can be very useful at times.› It can prevent a lot of re-entry of› data. DOS WIZ allows recovery of any› file up to the point where the chain› is broken. This then becomes a valid› DOS file and can once again be› accessed. › BAD SECTOR?› 3. A bad sector on a disk is often› a big headache even when your file is› backed up. It means that all good› files must be copied and the disk› reformatted and the good files copied› back. Only then can you restore your› file from the backup.›› ANOTHER WAY?› DOS WIZ allows another approach› that is very often successful. You› can analyze the disk to get the› location of the bad sector and it's› associated file name. You can then› write zeros to that sector and the› odds are very good that you will then› be able to read it again. If you can't› you haven't lost anything since the› sector was unreadable. You may then› recover the file up to the point of› the zero sector and then delete the› file. Now you can recover the sectors› used by the file and then rewrite your› backup file to the disk. It sounds› complicated, but is really quite› simple and much easier than the› alternative discussed earlier. ›› COME BACK LITTLE FILE!› 4. Occasionally a file gets deleted› by mistake. If the sectors used by› that file have not been overwritten,› DOS WIZ will allow easy recovery of› the file.›› TOO MANY NAMES?› 5. Sometimes you end up with two or› more files of the same name. If you› delete or rename one with DOS, all› files with that name are deleted or› renamed. DOS WIZ lets you delete or› rename by file number. There are› never duplicate file numbers.›› HANDLING ALLOCATED SECTORS!› 6. DOS WIZARD provides a› translation of the sector bit map from› the VTOC that is easily readable. It› allows you to "hide" sectors from use› by DOS by marking them as allocated. › You can also free allocated sectors.›› FULL DIRECTORY LISTING!› 7. DOS WIZARD's directory listing› lists ALL entries including deleted› and open files. It allows you to› perform many DOS functions on those› files by simply referencing the file› number. This does however eliminate› the use of wild cards. The directory› listing also tells you at a glance› whether any sectors are unaccounted› for.›› FLAGGING SECTORS!› 8. DOS WIZARD will allow you to› flag sectors as allocated and› effectively hide them from DOS so that› they will be reserved for your use.›› SPEEDUP!› 9. DOS WIZARD can be used to clear› unused sectors of data. This will› speed up the disk duplication process› when FASTDUP (Copyright 1982 by Gary› C. Crider) is used.›› HEX OR ATASCII?› 10. DOS WIZARD will display sectors› in hex and ASCII on the same screen.› It also gives much valuable› information about that sector such as› the file to which it belongs.›› LISTING CONTIGUOUS SECTORS!› 11. DOS WIZARD will list all› extents by sector range which are› occupied by a given file. An extent› is a set of contiguous sectors. ›› PRINTING THE DOSWIZ DOCUMENTATION!› Running the DOSWIZ.PRT program› using BASIC will print the DOSWIZ.DOC› file in 1.75 width letters on a STAR› (tm) GEMINI series printer. It may› work on other printers as well.› Another way to print it would be to› use the COPY feature of your DOS or› DUP.SYS utility, specifying P: as the› output file name. It can also be› printed from most word processors.› This should work okay on the EPSON› (tm) printers. ›› A DISKETTE ANALYSIS›› This MENU option performs a two-› stage analysis of the contents of a› DOS format diskette. Either stage may› be interrupted by pressing the ESC› key, but any statistics will only be› valid up to the point where the› interrupt occurred.› Stage 1 reads all DOS files which› are not marked as deleted or open and› verifies that the chain is intact. All› chain errors are reported with the› sector number where the violation› occurred and the file name for the› chain being validated. A chain error› is reported if:› a) The file number in the sector› does not reflect the file being› validated;› b) The next sector pointer does› not point to a valid sector number;› c) The sector is not marked as› allocated in the VTOC;› d) A read error occurs while› trying to read the sector;› e) The byte count in the sector› is less than 1 or greater than 125.›› Stage 1 reports the following› counts:› 1. VALID FILES - the number of› files which are accessible by DOS and› contain no chain errors.› 2. DELETED FILES - the number of› directory entries flagged as deleted.› 3. OPEN FILES - the number of› directory entries flagged as open.› 4. BAD CHAINS - the number of› files which were found to have invalid› chains.› 5. SECTORS ALLOCATED - the› number of sectors which are marked as› allocated in the Volume Table Of› Contents (VTOC).› 6. FREE SECTORS - the number of› sectors marked as not allocated in the› VTOC.› 7. DEAD SECTORS - the number of› sectors allocated less the number of› sectors validated while verifying› chains. These sectors cannot be› referenced by DOS.›› Stage 2 reads every sector on the› diskette and reports the count of› sectors containing no data (ZERO› SECTORS) and the count of sectors› which could not be read (BAD› SECTORS).› Stage 2 will list by sector number› the first 64 bad sectors encountered. › If there are more than 64 and you need› to know where they are, consider using› FASTDUP.›› "C" CHANGE DISKETTES› This function must be performed› before processing a different diskette› since the VTOC and directory are read› into core only once by DOS WIZARD.› "D" DISPLAY DIRECTORY› This MENU function lists all› directory entries currently in use or› formerly used on this diskette. It› also gives access to many functions› which may be performed on a file. › The directory listing provides the› following for each file:› a) FILE#- This is the number of the› directory entry. They are numbered› from 0-63;› b) NAME- This is the file name› contained in this directory entry › Files which are recognizable and› accessible by DOS are in REVERSE› VIDEO. These would appear in a DOS› directory listing;› c) START- The starting sector› number for this file;› d) COUNT- The number of sectors› used by this file;› e) STATUS- Will contain "D" if the› file has been marked deleted, "O" if› it is marked as open, and "L" if the› file is locked.›› DEAD SECTORS?› The display trailer contains the› number of free sectors and the number› of sectors accounted for which should› equal 707. If this number is other› than 707, there are dead sectors on› the disk. However there could still be› dead sectors even if there are 707› sectors accounted for. DISKETTE› ANALYSIS can be used to reveal this› condition.›› DISPLAY DIRECTORY allows the following› functions to be performed:› a) UNLOCK - unlock file by› specifying file number.› b) LOCK - lock file by specifying› file number. › c) DELETE - delete file by file› number. This will delete the entry› and free all sectors up to› encountering any chain error. This› can be used when DOS delete will not› work due to errors. If a file will› not delete with DOS WIZ, do a RECOVER› FILE (R) against the file and then› delete it.› d) RENAME - rename a file by› specifying a name for a file number. › e) LIST FILE EXTENTS - obtain a list› of all areas of contiguous sectors› occupied by a file.› f) RECOVER FILE - recover a deleted› file or a portion of a file with a› broken chain. If the file is an open› file, an extender will be used of Xnn› where nn is the file number. This› prevents duplicate file names due to› having recreated a file that was open› and thought to be lost. File recovery› makes a valid file out of the portion› of the file that can be read up to the› point of an error being encountered,› thus to DOS it is now a good file but› it may still be useless to you. You› can salvage portions of a data (LIST› format) file but BINARY LOAD AND› CSAVEd FILES CANNOT BE USED AFTER› RECOVERY except by the DELETE function› of DOS WIZ or DOS.› M) SECTOR MAP - This MENU function› displays a translation of the sector› bit map from the VTOC. Each sector› from 0-719 is represented by either a› period (free sector) or an asterisk› (allocated sector). Since sector 0› does not exist, it is always shown as› allocated. Sector 720 is not› recognized by DOS and is not shown on› the map.› To obtain the sector number of a› position on the map, add the numbers› from the scales on the left and top of› the screen.› There are three functions available› from this screen:› a) ALLOCATE SECTOR(S) - specify› starting and ending sector numbers› (inclusive). These sectors will be› marked as allocated and will be› unavailable to DOS. If the ending› sector is not specified, it will› default to the starting sector so only› one sector will be allocated.› b) FREE SECTOR(S) - same as above› except sectors are marked as free. › These sectors become available for use› by DOS when new sectors are needed.› c) RECLAIM LOST SECTORS - This is› the powerful recovery utility› discussed in the INTRODUCTION. It› chases all non-deleted and unopened› file chains and remembers the good› sectors. Any sectors that are› allocated but not on a valid chain are› zeroed and released for use by DOS. › If a chain error is encountered, a› message is displayed indicating the› sector and file. A file recovery› should be done on that file (see› DISPLAY DIRECTORY) and then redo the› reclaim function. It is not always› necessary, but can't hurt anything.› S) DISPLAY SECTOR(S) This MENU› function is used to read a given› sector and display it. The left› portion of the screen displays hex› representation of the sector data› while the right portion displays most› of the pertinent ASCII characters› represented by the sector data. The› bottom of the screen has valuable› information about the sector. › Information is displayed only when› pertinent to the sector being› displayed.› › Read "CDOSWIZB.TXT" for rest of the› DOSWIZ DOCS!›