home *** CD-ROM | disk | FTP | other *** search
/ Futura 16 / Futura_Issue_16_1995_NOSAUG_Side_B.atr / doswiz.doc < prev    next >
Text File  |  2023-02-26  |  13KB  |  1 lines

  1. ¢DOS WIZARD¢¢NOTE:  IT IS IMPORTANT THAT YOU UNDERSTAND WHAT YOU ARE DOING WHEN YOU USE DOS WIZARD.  It will be one of your handiest utilities, but also one of the most potentially dangerous if you don't understand it.  It is also not magical... it will not work if the DOS or the DOS directory is what is wrong on the bad disk.¢¢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.¢¢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 he 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.  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.¢¢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.¢¢     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.¢¢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.¢¢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.¢¢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.¢¢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.¢¢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.¢¢9.   DOS WIZARD can be used to clear unused sectors of data.  This will speed up a disk duplication.¢¢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.¢¢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.¢¢¢ 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.¢¢     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.¢¢  a) SECTOR: This is the sector number of the sector being displayed.¢  b) NEXT SECTOR: This is the next sector on the chain.  It is only displayed when it is determined that the current sector is indeed on a chain.¢  c) BYTES: This is the number of bytes used by DOS in this sector.¢  d) The lower left corner is used to display the file name to which this sector belongs and whether that file is open, closed, deleted, or locked.¢¢     There are several options available from this screen.  If you press Z, 128 binary zeros will be written in the sector.  If the sector is allocated, it can be freed by pressing F.  If it is free, it can be allocated by pressing A.  Pressing L will read the next sector on the chain, while RETURN will read the next sequential sector.¢¢     If the sector is the last sector on a chain then message END OF CHAIN will appear in the trailer in place of NEXT SECTOR.¢¢¢ Z   ZERO UNUSED SECTORS.¢¢     This MENU function writes a sector of binary zeros to all sectors which are marked free in the VTOC.  This is beneficial if you use my FASTDUP program to duplicate disks.  Since FASTDUP does not store or write any sectors which contain all zeros, getting rid of unused data can speed up the duplication process.  The delete functions of DUP.SYS and DOS WIZARD do not zero sectors as they delete the file.  This is good since mistakenly deleted files can sometimes be recovered with DOS WIZ.¢¢CAUTION--If you have sectors marked as allocated but they are not on a file chain (to protect them from use by DOS), this function will not zero those sectors, but the RECLAIM function of the SECTOR MAP will.  Know what you are doing!¢¢¢GENERAL INFORMATION¢¢Send all correspondence to:¢¢GARY C. CRIDER¢1105 BURGESS COURT¢ARLINGTON, TEXAS 76015¢(817) 467-1114¢