%ì Librarian V09-27Cxôˆˆ´Ó‡Šôˆˆ´×jÙØØô5€ŽèATTACHÖØ Bug_reportstNCHECKSUMJ COPY_FILEmDEPOSIT2^DESELECTO DIRECTORYdRDUMPjEXAMINE „ExamplesrØFILL„HELP Installationn New_FeaturesªODS2Õr ODS5_support²Overview3^READx’RESTORE<ØREWRITEu²SAVE{SEARCH+€SELECTŠ SET‡òSHOW4SPAWN?0TEST7¼WRITE ­уôˆˆ´1 InstallationH To install DISKBLOCK you need to copy the kit to a directory on your 4 local system where you have 1500 blocks of quota.B Then type @SYS$UPDATE:VMSINSTAL DISKBLOCK dev:[dir] to install C diskblock. DISKBLOCK installation DOES NOT modify any VMS files. C After deleting all files except DISKBLOCK.EXE and DISKBLOCK.HLB$ it will take up about 400 blocks.E To use this help file from within DISKBLOCK you may either copy theD library to SYS$COMMON:[SYSHLP]DISKBLOCK.HLB or define logical name; DSKB_HLB to point to be dev:[dir]filename of the library.ww­уôˆˆ´1 HELP3 DISKBLOCK is a low level disk block editing tool.M It can be used to read, modify and write LBNs on a disk or VBN's in a file.F It can also carry out read, write and seek performance measurements.9 Type OVERVIEW at the Topic? prompt for more informationww­уôˆˆ´ 1 OverviewG DISKBLOCK is a tool for reading and writing Logical Blocks on a disk  or Virtual Blocks in a file.I Diskblock ingores all locking activity on the selected Disk or File, itK can access and modify ODS2 and ODS5 data structures such as file headers N and it can read, write and test individual shadow set members independently!D There is a buffer which holds a copy of the block which you read, F you can modify the contents of this buffer using EXAMINE and DEPOSITI commands and then REWRITE it to the same block, WRITE it to a di fferentG block or SELECT a new disk or file and WRITE the buffer to any block.F When you SELECT a disk, diskblock will attempt to map the Index FileJ If it is successful then any command which requires an LBN (READ, WRITE,I COPY etc...) will also accept a FID and operate on the appropriate file? header. This will work even if the disk is mounted /FOREIGN.I There are commands to SAVE and RESTORE the buffer so that you can keep J a copy of the original block and undo changes if t hey do not work as you expect.H There is a CHECKSUM command to enable you to recalculate the checksums1 for ODS2 and ODS5 file headers and home blocks.@ There is a DIRECTORY command which will find the header for a - file (even if the disk is mounted /foreign)H There is a COPY command which will enable you to treat any block on a L disk as a file header and copy the LBNs described by its mapping pointers 7 to a new file (even if the disk is mounted /foreign). C There is a SEARCH command which will search the entire disk/file E (or any range of blocks) for a particular string or integer or file header.H There is a TEST command which will carry out performance testing. YouI may specify queue lengths, I/O sizes, read/write ratios and seek types A and Diskblock will report throughput and bandwidth to the disk.; Because of its potential to corrupt disks you should onlyB use Diskblock in extreme desperation or on a disk which you have backed up.  - You need LOG_IO privilege to run DISKBLOCK.9 Type EXAMPLES at the Topic? prompt for more informationww­уôˆˆ´ 1 ExamplesE Search shows the use of the search command to locate a file header,7 and then to copy the file to a normally mounted disk.= This may be used even on a disk with a corrupted INDEXFILE.H Modify_disk shows the use of DISKBLOCK to repair a damaged home block.H Modify_MFD shows the use of DISKBLOCK to change the file attributes of [000000]000000.DIR= Undelete_file shows the use of DISKBLOCK to undelete a file2 SearchF In this example DISKBLOCK is used to find a file on a corrupted disk> and then to copy the file to the users SYS$SCRATCH directory $ RUN SYS$SYSTEM:DISKBLOCK* DISKBLOCK V5.7H Copyright (c) Digital Equipment Corp. 1997. All rights Reserved. $ MOUNT /FOREIGN $1$DUA42# DISKBLOCK> SELECT $1$DUA42 /NOMAP' DISKBLOCK> SEARCH /HEADER=X.EXT /FULLR %DSK B-I-SEARCHING, Searching blocks 0 - 2376152 for HEADER "X.EXT;*" at 13:23:45! LBN: 1188943, Filename: X.EXT;2: FID: 1032, SEGNUM: 0, CREDATE: 19-MAY-1994 01:30:09.762 %DSKB-I-SEARCHDONE, Search completed at 13:44:10& DISKBLOCK> DUMP /FILE /BLOCK=11889437 ... Check that this is the correct file header....... DISKBLOCK> COPY 1188943; %DSKB-I-CREATED, Created file DUA0:[RANCE]COPY_FILE.DAT;1< %DSKB-I-COPYING, Copying 214 blocks starting at LBN 113124: %DSKB-I-COPYING, Copying 24 blocks starting at LBN 10456S %DSKB-I-CPYACL, 92 Bytes of ACL information copied to DUA0:[RANCE]COPY_FILE.DAT;1W %DSKB-I-CPYATTRIB, File attributes successfully copied to DUA0:[RANCE]COPY_FILE.DAT;1 2 Modify_diskE In this example a backup copy of the home block is used to repair a corrupted primary home block. $ RUN SYS$SYSTEM:DISKBLOCK* DISKBLOCK V5.7H Copyright (c) Digital Equipment Corp. 1997. All rights Reserved.$ DISKBLOCK> MOUNT /FORE IGN $2$DUA22E DISKBLOCK> SELECT $2$DUA22 ; Select the problem driveJ DISKBLOCK> READ 2 ; Read backup copy of HomeblockE DSKB-I-BLKREAD, Block 2 (%X00000002) of _$2$DUA22 successfully read( DISKBLOCK> HELP ODS2 HOME HOMELBN J .......................... ; Find size and offset of field8 DISKBLOCK> DEPOSIT 0 1 ; New HOMELBN8 DISKBLOCK> DEPOSIT/WORD 16 2 ; New HOMEVBN= DISKBLOCK> CHECKSUM /HOME /DEPOSIT  ; Modify checksumsE %DSKB-I-CHKCHANGED, Checksum has been changed from %X289B to %X3F9BE %DSKB-I-CHKCHANGED, Checksum has been changed from %X5136 to %X7F36? DISKBLOCK> DUMP /HOME ; See if it looks OK .........................G DISKBLOCK> WRITE 1 ; Write to primary homeblockK %DSKB-I-BLKMODIF, Block 1 (%X00000001) of _$2$DUA22 successfully modified 2 Modify_MFDK In this example the ownership of the MFD of a disk is changed to be [1,4 ] $ RUN SYS$SYSTEM:DISKBLOCK* DISKBLOCK V5.7H Copyright (c) Digital Equipment Corp. 1997. All rights Reserved.I DISKBLOCK> SELECT DUA2:/OVER ; Allow writes to mounted diskG DISKBLOCK> READ /FID=4 ; Read header for 000000.dirK DSKB-I-BLKREAD, Block 273590 (%X00042CB6) of _NODE$DUA2 successfully read3 FID: 4 LBN 273590 [000000]000000.DIR;1B DISKBLOCK> HELP ODS2 FILE_HEADER ; Check field for owner C DISKBLOCK> DEPOSIT 60 %X00010004 ; CHANGE FH2$L_FILEOWNER DISKBLOCK> rewrite /checksumC%DSKB-I-CHKCHANGED, Checksum has been changed from %XCC5D to %XCC5AG%DSKB-I-BLKMODIF, Block 273590 (%X00042CB6) of _DINCY$DUA0 successfullymodified2 Undelete_fileJ In this example a file on an ODS2 mounted disk is undeleted by patching  the file header $ RUN SYS$SYSTEM:DISKBLOCK* DISKBLOCK V5.3H Copyright (c) Digital Equipment Corp. 1991. All rights Reserved." DISKBLOCK> SELECT /OVER $1$DUA2:* DISKBLOCK> DIRECTORY MYFILE.DAT /DELETED8 FID: 6998 LBN 273600 [RANCE.DAT]MYFILE.DAT;1: DISKBLOCK> read /fid=6998 ! Read the file headerJ %DSKB-I-BLKREAD, Block 273600 (%X00042CC0) of _$1$DUA2 successfully readB %DSKB-W-RDBADHEADER, Invalid File Header, FID: 6998, LBN: 273600I -DSKB-E-HDRINVFID, FH2$W_FID_NUM (byte 8) is 0, could be a deleted fileF DISKBLOCK> EXAM 52 ! Check current file characteristi cs@ DISKBLOCK> DEPOSIT 52 0 ! Clear bit 15 (FH2$V_MARKDEL)9 DISKBLOCK> DEPOSIT /WORD 8 6998 ! Write the correct FID; DISKBLOCK> CHECKSUM /DEPOSIT ! Create a valid checksumE %DSKB-I-CHKCHANGED, Checksum has been changed from %X5327 to %XAF62C DISKBLOCK> DUMP /FILE ! Check that file header is validH DISKBLOCK> REWRITE ! Write file header back to INDEXF.SYSM %DSKB-I-BLKMODIF, Block 1000 (%X000003E8) of _$1$DUA2 successfully modified8 Now you need t o Dismount the disk, mount it again and 7 $ ANAL /DISK /REPAIR should put the file in [SYSLOST]ww­уôˆˆ´1 New_Features2 V4.0_New_FeaturesC SELECT /FILE allows you to select a file and then do virtual I/O.E This can be useful for writing to a file which is locked by anotherJ user, or for searching a large file for a text string or Longword value.> Modifications made by Burnace Leung to create DSKBLK_V3 have? been included as COPY_FILE and DIRECTORY. See EXAMPLE SEARCH? for an example of copying a file from a foreign mounted disk.@ READ/FID has been added to enable you to specify a File ID and read the corresponding LBN.< A /CHECKSUM qualifier has been added to the write command.6 This makes life simpler when modifying file headers.# A number of bugs have been fixed.2 V4.1_new_featuresD There are only three very minor differences between DISKBLOCK V4.0 and DISKBLOCK V4.1.* The handling of HELP is now more robust.8 The search command can now be cancelled by typing a ^C0 DISKBLOCK can now be installed with VMSINSTAL.2 V5.0_New_FeaturesF Diskblock V5 has been totally re-written in C (it used to be Macro).= There are major improvements in the area of error handling,B especially in the handling of disk errors during READ and SEARCHA commands and in the validation of Home blocks and file headers.D Control C and Control T handling now work during Directory as well as search operations.= There has been a syntax change for READ /FID and WRITE /FID4 There are a number of new commands and qualifiers. 3 SET_LOGJ The SET LOG command causes ALL diskblock output to be sent to a log file as well as to the terminal 3 SET_PAGEG The SET PAGE command causes diskblock output to pause every screenful, and prompt with "Type a to continue". 3 REWRITEB The REWRITE command allows a block to be written back to the LBNG it was read from to reduce the chance of mis-typing the block number. 3 DIRECTORYJ The DIRECTORY command now displays FULL file specification, FID and LBN.C DIRECTORY/FID has been added to convert a FID number to filename.D DIRECTORY/LBN has been added to find the file using any given LBN.E The performance of the DIRECTORY command has been greatly improved.3 /FORCED_ERRORF There is a /FORCED_ERROR qualifier to WRITE and REWRITE which allowsG a block to be written with the forced error flag set. USE THIS WITH E EXTREME CAUTION - IF YOU DON'T UNDERSTAND WHAT IT MEANS THEN DON'T 9 USE IT!!!! 3 CHECKSUM/HOMEE The checksum command now takes a /HOME qualifier which causes it to8 check or modify BOTH of the checksums in a home block. 3 COPY/BUFFERA There is a /BUFFER qualifier to COPY_FILE which allows the mainC read/write buffer to be the file header of the file to be copied.G This enables you to modify the header without writing the input disk.3 /FIDF This qualifier to READ and WRITE now requires the fid as a qualifierI value (e.g. READ /FID=1000) rather than as a parameter (READ /FID 1000)@ This has been done to be consistent with DIR/FID and COPY/FID.2 V5.1_New_Features6 V5.1 has two minor bug fixes and three new features. Bug_fixesD DISKBLOCK> CHECKSUM/HOME/DEPOSIT now correctly sets both checksums? DISKBLOCK> DIR /LBN=0 now correctly identifies the INDEXF.SYS New_features DISKBLOCK> SET WRITE DISKBLOCK> SET NOWRITEB These commands enable and disable writing the selected disk/file DISKBLOCK> DIR ... /VALID_ONLY> This qualifier causes invalid file headers to be ignored and= DIR /LBN for a single LBN will finish after a single match.= The diskblock help library no longer has to be in SYS$HELP,) $ DEFINE DSKB_HLB dev:[dir]filaneme.HLB to access the help library2 V5.2_New_Features3 V5.2 has the following bug fixes and new features9 Diskblock now works on both OpenVMS VAX and Op enVMS AXPA DUMP /HOME has been added to display the buffer as a home block8 DUMP /HEADER has been added as a synonym for DUMP/FILED SEARCH/HEADER is a new command to find blocks that look like validC file headers and report the LBN and filename. It is NOT the sameG as the directory command since it does not use the INDEXF.SYS mapping" pointers to locate file headers./ EXAMINE/TIME and DEPOSIT/TIME have been added> COPY now propagates the file owner and protection as well !as@ file characteristics and record attributes. It still does not propagate ACLs.? DISKBLOCK no longer issues a SHOW command every time you do a? select. You may issue the SHOW command yourself if required.? A memory leak has been fixed that lost TRACK_SIZE * 512 bytes$ every time a new disk was selected@ The page length was being incorrectly handled if a string withG no line feeds (or more than one line feed) was sent to the terminal,  this has now been fixed2 V5".3_New_Features% V5.3 has the following new features> FILL command fills the read write buffer with a data patternD Many new qualifiers to the Directory command allow file selections to be made.8 /SELECT=SIZE finds files above or below a certain size/ /BY_OWNER finds files with a particular owner# /DELETED finds ONLY deleted files0 /BACKFID finds files in a particular directory8 /BEFORE /SINCE /BACKUP /CREATED /EXPIRED and /MODIFIED< allow selection of files based o#n dates in the file header2 V5.4_New_Features4 V5.4 has the following new features and bug fixes.C DIRECTORY /PLACEMENT finds files with placement mapping pointersG SAVE and RESTORE now use the /BLOCKS=(START,END,COUNT) qualifier to H save and restore any contiguous range of blocks on the selected disk or file.G DUMP can now use the /BLOCK and /FID qualifiers to dump a formatted F block from the disk without having to overwrite the main read write buffer.E $ SEARCH /HEADER has a new switch /FULL which gives a second line ofF information for each header found showing Extension Segment number, Creation Date and FID.I Improvements have been made to the handling of disk read errors during DIRECTORY commands.L The default for a SELECT command has been changed from /WRITE to /NOWRITEI A potential hang caused by the use of the same Event flag at both AST % and process levels has been fixed.H An access violation during Exam%ine commands on Alpha systems has been fixed.H Incorrect numeric and UIC displays from dump commands have been fixed2 V5.5_New_FeaturesJ The copy command now copies ACLs as well as other file characteristics.G The copy command now uses the filename from the input file header asH the default output file name. The default output directory is still  SYS$SCRATCH;E A problem which caused incorrect display of some data values from @ the dump command on OpenVMS Alpha& systems has been corrected.C A problem which caused incorrect display of data values from theF EXAMINE /OCTAL command on OpenVMS Alpha systems has been corrected.E Added the ability to detect nested directory loops to all commands that display directory names2 V5.6_New_FeaturesF TEST command performs I/O performance testing, with user selectableH queue length, I/O size, etc. You must read the warnings in this help& file before using the test command.J READ /S'CB qualifier finds and reads the Storage Control Block of a diskJ DUMP /SCB dumps the current buffer formatted as a Storage Control BlockD Support for ODS5 format disks has been added. Type HELP ODS5 for? details of what ODS5 features are available within DISKBLOCKC A problem which caused the dots to be missing from the directory. part of displayed filenames has been fixed.2 V5.7_New_Features F Correct display of secondary error status from Read and Write errors! du(ring Search and Test commands. Corrected display of DOTs in directory names2 V5.8_New_FeaturesH Cancel Test I/O and allow it to run down if user types Control-C, this? prevents errors when running multiple tests from a batch job.G Modified Test to use the main Read / Write buffer as the data pattern8 for writes, rather than just defaulting to all Zeros. 2 V6.0_New_FeaturesC Diskblock V6 has been converted from VAXC to Standard C to enable7 support of OpenVMS on VAX, A)lpha and Itanium hardware@ There is now a single kit that can be installed on all OpenVMS systems.2 V6.1_New_FeaturesC There is a new /SINGLEPASS switch to enable TEST / SEQUENTIAL to ; finish as soon as all blocks have been read or written. 2 V6.2_New_Features@ V6.2 has a number of bug fixes and new features, most provided by Volker Halle@ There is a new /BCK switch on the SEARCH command, this enables2 you to search the disk for backup block headers.> There is* a new /BCK switch on the DUMP command, this formats& the buffer as a backup block header.B There is a new /OFFSET switch on the SEARCH command, this allows? you to search for a particular value at a known offset in the blocks scanned.? Debug printout of mpoffset and idoffset in the SEARCH command has been removed.? A bug that caused fatal errors writing the output file during) SEARCH/HEADER/OUTPUT... has been fixed.A A bug that caused an ACCVIO when testing with /QUE+UE=0 has been fixed.C Display of LBNs on very large disks no longer appears as ********2 V6.3_New_Features? V6.3 has a number of bug fixes and new features, all provided by volker.halle@invenate.de? Add support for 2TB disk volumes (on OpenVMS V8.4 or higher).C When using DIRECTORY command, prevent %DSKB-I-DIRLOOP message on  [000000]000000.DIR.5 Correctly handle FIDs > 65535 using FH2$B_xx_FIDNMX8 Support FIDs > 65535 in decoding backup saveset blocks8 ,Fix help and examples for DIRECTORY qualifier /BACKFID@ Fix DIRECTORY/BACKFID FID value output in Control-T interrupt ; Fix help text for SAVE and RESTORE /BLOCKS=(...) examples( Add more dependencies in DISKBLOCK.MMS@ Generate correct DISKBLOCK.MAP file when building from sourcesD Prevent display of garbage file names when using DIRECTORY commandww­уôˆˆ´1 SELECT: Use the SELECT command to select a new drive or file for; reading and writing. Before selecti -ng a drive it must be? mounted foreign (unless you specify the /OVERRIDE qualifier).> SELECT automatically DESELECTS any previously selected drive% or file before selecting a new one.G By default LBN 1 (HOME BLOCK LBN) will be read to locate the primary @ index file header. If this fails because of hardware error orK corrupted home block then index file retrieval pointers will not be read. 2 Parameters device_name. Specifies the name of the disk to be selected file_name.5 Specifies the name of the file to be selected (requires SELECT/FILE)2 Command_Qualifiers/FILEF Use this qualifier to enable you to perform Virtual I/O to a single D file on an ODS2 mounted disk. This allows you to use DISKBLOCK asC a utility somewhere between Patch and Dump, it will allow you to I modify the contents of a file without taking out RMS locks - even when , someone else has the file open and locked. /OVERRIDED Use the /OVERRIDE qualifier to e/nable you to read and write a diskE that is not mounted foreign. Use even more extreme care when doing@ this as you could cause great damage to the VMS file system by, modifying disks that are normally mounted.8 This qualifier cannot be used with the /FILE qualifier/NOMAPE Use this qualifier to prevent DISKBLOCK from reading the Home Block$ and Index File retrieval pointers.8 This qualifier cannot be used with the /FILE qualifier/HOMELBN< Use this qualifier to specify an 0 alternate Home Block LBN.C DISKBLOCK will read this alternate HOMELBN, validate its contentsE and use it to locate the Index File Header. The Index File mapping Pointers will then be read.8 This qualifier cannot be used with the /FILE qualifier< This qualifier cannot be used with the /INDEXLBN qualifier /INDEXLBNC Use this qualifier to specify an alternate Index File Header LBN.C DISKBLOCK will read this LBN, validate its contents and read the  index file mapping pointer1s.8 This qualifier cannot be used with the /FILE qualifier8 This qualifier cannot be used with the /HOME qualifier> If you use the qualifier /INDEXLBN you must also use /FACTOR/FACTOR D If you use the /INDEXLBN qualifier then Diskblock will not read a D Home Block, this means that the cluster size and index file bitmapC size are not available. You must therefor specify a FACTOR which8 Diskblock can use to map File IDs to Indexfile VNBs.  F This factor shou2ld be (CLUSTER_SIZE * 4) + (Index File Bitmap Size) F If you select an incorrect value then Diskblock will translate FIDs  to LBNs incorrectly./WRITE@ Select /WRITE causes DISKBLOCK to operate in READ / WRITE modeC the WRITE and REWRITE commands can be used to modify the selected DISK or FILE.D Select /NOWRITE causes DISKBLOCK to operate in READ ONLY mode, theI selected disk or file can be READ or SEARCHED but the WRITE and REWRITE commands will return an error. The 3default is SELECT /NOWRITE See also SET WRITE 2 Examples DISKBLOCK> SELECT $2$DRA2:1 DISKBLOCK> SELECT SYS$SYSTEM:SYSDUMP.DMP /FILE' DISKBLOCK> SELECT $2$DUS0: /OVERRIDE& DISKBLOCK> SELECT DISK$USER2 /NOMAP. DISKBLOCK> SELECT MYNODE$DUA1: /HOMELBN=nnn3 DISKBLOCK> SELECT DRA3: /INDEXLBN=nnn /FACTOR=85ww­Ã~…ôˆˆ´ 1 DESELECTF Use the DESELECT command to free a drive or file previously selectedF with a select command, this may help to prevent accident4ally writingG to a drive/file that you have finished with. An implicit DESELECT is9 performed for you whenever you SELECT a new drive/file.F Diskblock will not allow you to exit if the buffer has been modifiedD and there is still a Drive selected, you should Deselect the drive before exiting. DISKBLOCK> DESELECTww­Ã~…ôˆˆ´1 READB The read command is used to transfer data to Diskblocks internalJ 512 byte buffer. You must SELECT a drive or file before a read 5command.6 You can read a Logical Block from the selected disk.* Or a file header from the selected disk., Or a Virtual Block from the selected file./ You must specify a Block Number or a File ID.@ The default radix for the Block is decimal but you may use the< %X or %O operators to specify a Hex or Octal block number.G When you read a block the current contents of the buffer will be lostE If you require the current buffer contents then you should SAVE the' bufffer before readi6ng another block. 2 Parameter Block_numberC Specifies the LBN of the block to be read from the selected drive; or the VBN of the block to be read from the selected file2 Command_Qualifiers/FID? Use the command READ /FID to read an LBN from a disk when you= know the File ID of the file whose header you want to read.= This command will only work if you have read the index file+ mapping pointers with the SELECT command.F The FID will be translated to an LBN and the7 appropriate file headerD will be read in to the buffer, the buffer will then be checked to B ensure that the file header is valid and diagnostic messages may be issued. See also DIRECTORY /FID< The syntax for this command has changed with DISKBLOCK V5. The format is now...  DISKBLOCK> READ /FID=1000/SCB See also DUMP /SCBF Use the command READ /SCB to read the Storage Control Block from theC currently selected drive. The SCB is the first block of the fileG [0800000]BITMAP.SYS, it contains information relating to the mount and( Volume Shadowing status of the volume. The syntax for this command is DISKBLOCK> READ /SCBww­Ã~…ôˆˆ´1 WRITE See also REWRITE7 Use the write command to write the 512 byte buffer to( A Logical Block on the selected drive,) Or a File Header on the selected drive,* Or a Virtual Block in the selected file./ You must specify a Block Number or a File ID.@ The default radix for the Block 9is decimal but you may use the< %X or %O operators to specify a Hex or Octal block number.> You must SELECT a drive or file before issuing this command. DISKBLOCK> WRITE %xFF& DISKBLOCK> WRITE /CHECKSUM /FID=1004 2 Parameter Block_numberD Specifies the LBN of the block to be written on the selected drive< or the VBN of the block to be written to the selected file2 Command_Qualifiers /FORCED_ERRORE This switch will cause the block to be written to the disk with theG :forced error flag set. USE THIS WITH EXTREME CAUTION - IF YOU DON'T 0 UNDERSTAND WHAT IT MEANS THEN DON'T USE IT!!!! G The effect of this flag may depend on the type of disk, on DSA disks F it will cause a forced error condition when the block is read again,* the correct data will still be returned. F On some SCSI disks it will cause a parity error to be generated when/ the block is read and NO DATA to be returned.% DISKBLOCK> WRITE /FORCED_ERROR 100J DO NOT USE THIS SW ;ITCH UNLESS YOU HAVE A VERY GOOD REASON AND YOU REALLYH UNDERSTAND WHAT YOU ARE DOING, IT HAS BEEN INCLUDED SINCE I NEEDED IT E FOR TESTING DISKBLOCK AND I HAVE VERY OCCASSIONALLY FOUND A USE FOR8 A DISK THAT GENERATES HARDWARE ERRORS WHEN IT IS READ. /CHECKSUM B Use this command when the block you are writing is an ODS2 file D header. The block checksum will be caculated and then written to C the last word of the buffer. Then the WRITE function will write & the buffer back to the< selected LBN. See also CHECKSUM /DEPOSIT/FID? Use the command WRITE /FID to write an LBN on a disk when you> know the File ID of the file whose header you want to write.= This command will only work if you have read the index file+ mapping pointers with the SELECT command.D Diskblock will first verify that the buffer contains a valid file F header, if not then a diagnostic message will be issued and you willH be asked if you wish to continue. It will then convert the =FID to theD LBN of the corresponding file header and write the header to disk.< The syntax for this command has changed with DISKBLOCK V5. The format is now...  DISKBLOCK> WRITE /FID=234ww­Ã~…ôˆˆ´ 1 REWRITEB Use the rewrite command to write the 512 byte buffer back to theB last block read or written. You do not need to specify a block number.A You must SELECT a drive or file and then read or write a block  before issuing this command.F To see the> block that would be used for a rewrite command issue the  SHOW command. DISKBLOCK> REWRITE DISKBLOCK> REWRITE /CHECKSUM" DISKBLOCK> REWRITE /FORCED_ERROR2 Command_Qualifiers /FORCED_ERRORE This switch will cause the block to be written to the disk with theG forced error flag set. USE THIS WITH EXTREME CAUTION - IF YOU DON'T 0 UNDERSTAND WHAT IT MEANS THEN DON'T USE IT!!!! G The effect of this flag may depend on the type of disk, on DSA disks F it will cause a fo ?rced error condition when the block is read again,* the correct data will still be returned. F On some SCSI disks it will cause a parity error to be generated when/ the block is read and NO DATA to be returned.J DO NOT USE THIS SWITCH UNLESS YOU HAVE A VERY GOOD REASON AND YOU REALLYH UNDERSTAND WHAT YOU ARE DOING, IT HAS BEEN INCLUDED SINCE I NEEDED IT E FOR TESTING DISKBLOCK AND I HAVE VERY OCCASSIONALLY FOUND A USE FOR8 A DISK THAT GENERATES HARDWARE ERRORS WHEN IT IS READ. @/CHECKSUM B Use this command when the block you are writing is an ODS2 file D header. The block checksum will be caculated and then written to C the last word of the buffer. Then the WRITE fucntion will write & the buffer back to the selected LBN. See also CHECKSUM/DEPOSITww­Ã~…ôˆˆ´1 TESTC Use the TEST command to test the read or write performance of the selected disk drive or file.C You must SELECT the disk or file before issuing the test command.1 WA ARNING WARNING WARNING WARNING WARNING WARNINGG If you allow TEST to write to any disk then you will destroy the fileH system on that disk. If you allow TEST to write to any file then you H will destroy the contents of that file. If you allow test to write toH a member of a shadow set then the consistency of that shadow set will  be compromised!2 Command_qualifiers/QUEUE /QUEUE=lengthK Use the /QUEUE qualifier to specify the queue length that you want to use during the tBest.K A queue length of 0 will submit a single I/O and then submit another when the first one finishes.! The default queue length is 20./IOSIZE /IOSIZE=blocksH Use the /IOSIZE qualifier to specify the size of each test I/O in disk7 blocks. The default I/O size is 1 block (512 bytes). /SEQUENTIALJ Use the /SEQUENTIAL qualifier to cause the test to carry out sequential 9 I/O operations. The default is to perform RANDOM I/Os.1 You cannot specify both /SEQUENTIAL Cand /RANDOM! See also /BLOCK and /SEQUENTIAL /SINGLEPASSD Use the /SINGLEPASS qualifier in conjunction with the /SEQUENTIAL H qualifier to cause the test to complete after all blocks in the range have been read / written once.4 You cannot specify /SINGLEPASS without /SEQUENTIAL/RANDOMG Use the /RANDOM qualifier to tell DISKBLOCK to carry out random seeks2 during the test. This is the default behaviour.1 You cannot specify both /SEQUENTIAL and /RANDOM See alsoD /BLOCK/COMPARE /NOCOMPARE [D]H Use the /COMPARE qualifier to cause DISKBLOCK to follow every read or J write operation with a compare operation which will verify the data has  been correctly transferred. Default is /NOCOMPARE /DURATION /DURATION=secondsI Use the /DURATION qualifier to cause DISKBLOCK to stop testing after a I fixed number of seconds. Default is to continue testing until you type CONTROL-C./BLOCKS /BLOCKS=(keyword[,...])I Using the /BLO ECKS switch you can specify a starting block and an endingD block or a count of the number of blocks to test. You can specifyD both a START block and an END block, or a START block and a COUNT,4 you may not specify both an END block and a COUNT.< The default START block is 0 for a DRIVE and 1 for a FILE.$ DISKBLOCK> TEST /BLOCKS=START:%X40: This command will test all blocks starting from block 64+ DISKBLOCK> TEST /BLOCKS=(START:64,END=80)( This command will test blocks 64 to 80F> DISKBLOCK> TEST /BLOCKS=(START=3000, COUNT=1000) /SEQUENTIALC This command will test blocks 3000 to 3999 using sequential seeks /READPERCENT /READPERCENT=percentage7 This qualifier sets the read/write ratio of the test.# The default is READPERCENT = 100.9 You may set READPERCENT to any value between 0 and 100.> The current Read/Write buffer is used as source data for all blocks that are writtenI WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARN GINGK Setting this parameter to any value other than 100 will almost certainly I cause data corruption. The data that is copied to the disk or file is  effectively random.2 The safest way to carry out write testing is to  Create a large file.( Run diskblock and select that file.) Test within the blocks of that file.- Delete / Erase the file on completion. H This last step is essential if the device under test is a member of a K shadow set as you will otherwiHse leave the shadow set in an inconsistent  state.I To show that you have read this part of the help file you must specify K the qualifier /CORRUPT=DATA when you specify any value other than 100 for /READPERCENT. See also /WRITEPERCENT /WRITEPERCENT /WRITEPERCENT=percentageK This parameter is a convenient shortcut for specifying a 100% write test. DISKBLOCK> TEST /WRITE  is equivalent to DISKBLOCK> TEST /READPERCENT=0J Please read the warnings under /READPEIRCENT before using this qualifier./CORRUPT /CORRUPT=DATAE This qualifier is included as the severest possible warning of the ? consequences of using DISKBLOCK to do write testing on disks.G DISKBLOCK will only allow you to do write testing if you also include the qualifier /CORRUPT=DATA. For example.../ DISKBLOCK> TEST /READPERCENT=99 /CORRUPT=DATA 2 Example ( To test the read performance of a disk$ DISKBLOCK> select disk$user: /overD DISKBLOCK> test /iosize=J5 /queue=20 /readpercent=100 /duration=300 9 About to start testing with the following parameters...* Device: _$3$DRA0:, Test Duration: 300 Seconds& Read/Write Ratio: 100:07 Queue Length: 20 (Asynchronous I/Os)" I/O Size: 5" Start Block: 0) End Block: 41891839' Seeks: Random) Data Compare: Disabled* DoK you want to continue? : yes Total I/Os completed: 8132$ Run time: 299 Seconds I/Os per second: 428.0 mS per I/O: 2.31 Throughput: 1070.0 KBytes per second DISKBLOCK> ww­Ã~…ôˆˆ´ 1 COPY_FILE (See also EXAMPLE SEARCH)J Copy_file will copy a file from a FOREIGN mounted or corrupted disk, as , well as from an ODS2 or ODS5 mounted disk.H Diskblock will first verify that the block or buffer contains a Lvalid G file header, if not then a diagnostic message will be issued and you ( will be asked if you wish to continue.B The default output directory is SYS$SCRATCH: The default output0 filename is the name of the file being copied.D The copy command cannot create an ODS5 extended filename. If the H file you are copying has a filename containing ISO Latin1 characters, F multiple .s, or other syntax that is not valid in ODS2 then you must specify an output file name.@ NOTE tha Mt the copy will take place using the mapping pointers B in the file header, if the file header is corrupt then this may " create a VERY large output file.E After the file data has been copied the File and Record attributes,A the File Owner UIC and File Protection will be copied from the H original file header to the new file header. The Access Control List G (ACL) from the input file header will then be copied to the new file. C Use of this command does not modify the normal DISNKBLOCK 512 byte read / write buffer.E DISKBLOCK> COPY_FILE /OUTPUT=abcd.dmp %x90A12 ! LBN of file headerE DISKBLOCK> COPY /FID=1234 ! FID of file headerI DISKBLOCK> COPY /BUFFER ! File header has already been read2 Command_Qualifiers/OUTPUTH Use this switch to specify the filename of the NEW file to be created.F This command does not support the use of extended filename syntax on@ ODS5 disks, the output file must have an ODS2 style fileO name./FID@ Use the command COPY /FID to copy a file when you know the FID@ but not the LBN of the file header. The fid will be converted4 to an LBN and the appropriate header will be read.= This command will only work if you have read the index file+ mapping pointers with the SELECT command.< The syntax for this command has changed with DISKBLOCK V5. The format is now...  DISKBLOCK> COPY_FILE /FID=234/BUFFER@ Use the command COPY /BUFFER when the file header fo Pr the file< you want to copy is already in the main read/write buffer.> This enables you to read a file header from disk, modify it B and then use the modified header to copy the file without having9 to write the modified header back to the original disk.ww­Ã~…ôˆˆ´ 1 DIRECTORYI DIRECTORY accepts a filename including the * and % wildcard characters.J (but excluding any [, ] or directory specification) and displays the FIDK and LBN of the file header and the FULL FILE QNAME (including directories). G Once the header has been read the Backlink in the file header will beF used to find the directory name, up to 8 backlinks will be followed F until 000000.DIR is located and the full filename will be displayed.9 This command does not modify the main read/write bufferJ This command will work on ODS2 or ODS5 mounted or foreign disks so long M as the index file has been mapped with the SELECT command. ODS5 filenames J will be displayed as they are Rstored in the files - this is a different J format to that displayed by a directory command. No extra ^ characters M will be inserted to distinguish embedded . characters from file separators.! DISKBLOCK> DIRECTORY [filespec] 2 Parameter filespecE Specifies the file(s) to be listed. * and % wildcards are allowed./ All valid ISO Latin1 characters are accepted.9 Directory and/or device specifications are not allowed.2 Command_Qualifiers/FID /FID = nnn= Use DIR /FSID to display the filename associated with a FID. DISKBLOCK> DIRECTORY /FID=1000B FID: 1000 LBN: 1189345 [RANCE.SUBDIR.TEMP]TEMPFILE.EXT;23 See also READ /FID/LBN /LBN=(nnn[,...])D Use DIR /LBN to find which file maps a particular LBN on the disk.J Diskblock will read the entire INDEX File and check the mapping pointersI in all file headers to locate the file(s) that map(s) the given LBN(s).H Diskblock will continue scanning even after it finds a match to enab TleH the indentification of all pointers to multiply allocated blocks. You9 can abort the search with a Control C (^C) at any time.D If an invalid file header maps the lbn then an error message will 9 proceed the display of the filename. (See DIR /VALID).G You may specify multiple LBNs on a single command line in three ways,; DIRECTORY /LBN=(nnn,mmm,xxx,yyy) for multiple single LBNs? DIR /LBN=nnn /COUNT=xxx for a single contiguous range of LBNsC DIR /LBN=(nnn,mmm...) /COUNT=(Uxxx,yyy...) for many ranges of LBNsD The index file will only be scanned ONCE for each command so it isH much more efficient to form a single complex command with all the LBNsF you are interested in than to specify them one at a time in separate commands./COUNT /COUNT=(nnn[,...])B This switch can only be used in conjunction with DIRECTORY /LBN.= For the command DIR /LBN=x /COUNT=m all files that map LBNs+ in the range x to x+m-1 will be reported.A For the command DIR V/LBN=(x,y) /COUNT=(m,n) all files that map C LBNs in the ranges (x to x+m-1) and y to y+n-1) will be reported)6 e.g. DIR /LBN=10 /COUNT=10 will match LBNs 10 to 195 DIR /LBN=(100,200) /COUNT=(10,20) will match 4 LBNs (100 to 109) and LBNs (200 to 219)/OUTPUT /OUTPUT=filespec@ Use the /OUTPUT qualifier to cause the output to be written to= a file instead of to the terminal. The default filespec is SYS$SCRATCH:DISKBLOCK.LIS.H This qualifier does not suWpport the use of extended filename syntax on@ ODS5 disks, the output file must have an ODS2 style file name./VALIDJ If the /VALID qualifier is specified then only matching files with validK file headers will be displayed. Any invalid file headers will be ignoredG If /LBN and /VALID are both specified and there is only a SINGLE LBN H specified then the scan will stop after a single valid match has been  found./SELECT /SELECT=(keyword[,...])D The /SELECT qualifier has idenXtical syntax and meaning to the DCL  command DIRECTORY/SELECT/ DISKBLOCK> DIRECTORY /SELECT=SIZE=MINIMUM=nnn< Only report files with a size greater than or equal to nnn/ DISKBLOCK> DIRECTORY/ SELECT=SIZE=MAXIMUM=mmm9 Only report files with a size less than or equal to nnn= DISKBLOCK> DIRECTORY /SELECT=SIZE=(MINIMUM=nnn,MAXIMUM=mmm)@ Only report files with a size greater than or equal to nnn AND less than or equal to mmm /BY_OWNER /BY_OWNER=UICG The /BY_OWNER qualif Yier enables you to find files owned by a specific> UIC or rights identifier. Wild card UICs are not supported.( DISKBLOCK> DIRECTORY /BY_OWNER=[23,45]( DISKBLOCK> DIRECTORY /BY_OWNER=[RANCE]- DISKBLOCK> DIRECTORY /BY_OWNER=[USER,RANCE]( DISKBLOCK> DIRECTORY /BY_OWNER=PROJECT/DELETEDK The /DELETED qualifier can be used to locate the headers of DELETED filesI on the disk. If you use this qualifier then ONLY deleted files will beH reported, and the error message saying that thZis may be a deleted file will be suppressed DISKBLOCK> DIRECTORY /DELETED, DISKBLOCK> DIRECTORY /BACKFID=nnn /DELETED* DISKBLOCK> DIRECTORY VITAL.FILE /DELETED/BACKFIDG Only reports files with a particular FID in the file header BACK FID.G The BACK FID is the file id of the directory to which the file header is pointing= The file id of a directory file can be found by DUMP/HEADERB of the directory file (either from DCL or from within DISKBLOCK)J This qualifier can[ be used to locate all files in a particular directoryJ It can be particularly useful in conjunction with the /DELETED qualifier= to locate all files that have been DELETED from a directory, DISKBLOCK> DIRECTORY /BACKFID=nnn /DELETED /PLACEMENTH Only reports files which have placement information specified in their mapping pointers.  /SINCE /SINCE=time: Selects only those files dated after the specified time.L You must specify one of the following qualifiers with the /S\INCE qualifierF to indicate the time attribute to be used as the basis for selection, /BACKUP /CREATED /EXPIRED or /MODIFIED! The time should be specified as /SINCE=01-jan-1990 /SINCE=01-JAN-1990M /SINCE="01-JAN-1990 03:42:00.00" <-- NOTE: MUST BE UPPER CASE and QUOTED/BEFORE /BEFORE=time; Selects only those files dated before the specified time.M You must specify one of the following qualifiers with the /BEFORE qualifierF to indicate the time attribute to be] used as the basis for selection, /BACKUP /CREATED /EXPIRED or /MODIFIED! The time should be specified as /BEFORE=01-jan-1990 /BEFORE=01-JAN-1990N /BEFORE="01-JAN-1990 03:42:00.00" <-- NOTE: MUST BE UPPER CASE and QUOTED /BACKUPB Modifies the time value specified with the /BEFORE or the /SINCEA qualifier. The /BACKUP qualifier selects files according to theD dates of their most recent backups. This qualifier is incompatibleC with the following qualifiers th ^at also allow you to select filesB according to time attributes: /CREATED, /EXPIRED, and /MODIFIED./CREATEDB Modifies the time value specified with the /BEFORE or the /SINCE@ qualifier. The /CREATED qualifier selects files based on their< dates of creation. This qualifier is incompatible with theD following qualifiers that also allow you to select files according7 to time attributes: /BACKUP, /EXPIRED, and /MODIFIED./EXPIREDB Modifies the time value specified with the /BEFORE o _r the /SINCED qualifier. The /EXPIRED qualifier selects files according to theirA expiration dates. (The expiration date is set with the SET FILEC /EXPIRATION_DATE command.) The /EXPIRED qualifier is incompatibleC with the following qualifiers that also allow you to select files7 to time attributes: /BACKUP, /CREATED, and /MODIFIED. /MODIFIEDB Modifies the time value specified with the /BEFORE or the /SINCE? qualifier. The /MODIFIED qualifier selects files according to? the da`tes on which they were last modified. This qualifier isC incompatible with the following qualifiers that also allow you toC select files according to time attributes: /BACKUP, /CREATED, and /EXPIRED./FULLL Outputs a formatted dump of the file header for each matching file found 2 Examples! DISKBLOCK> DIR IMPORTANT*.*FILED FID: 2045 LBN: 1023456 [DIR.SUBDIR]IMPORTANT_3.ANY_FILE;1H FID: 31927 LBN: 2220459 [DIR.SUB.SUB]IMPORTANT.ANOTHER_FILE;14 DISKBLOC aK> DIR *.* /OUTPUTE %DSKB-I-CREATED, Created file DISK$USERS3:[RANCE.TEMP]DISKBLOCK.LISG %DSKB-I-LASTFID, Just read FID 2883 at 16:23:08 <-- Control T typed DISKBLOCK>  DISKBLOCK> DIR /FID=2045D FID: 2045 LBN: 1023456 [DIR.SUBDIR]IMPORTANT_3.ANY_FILE;1 DISKBLOCK> DIR /LBN=10008 FID: 7671 LBN: 370067 [RANCE.SUBDIR]FILE.EXT;2D %DSKB-W-RDBADHEADER, Invalid File Header, FID: 15499, LBN: 1203844I -DSKB-E-HDRINVFID, FH2$W_FID_NUM (byte 8) is 0, could be a delet bed file9 FID: 15499 LBN: 1203844 [RANCE]DELETED_FILE.TMP;1! DISKBLOCK> DIR /LBN=1000 /VALID8 FID: 7671 LBN: 370067 [RANCE.SUBDIR]FILE.EXT;2 DISKBLOCK> DIR /BACKFID=23011 FID: 7671 LBN: 370067 [RANCE]FILE.EXT;2D %DSKB-W-RDBADHEADER, Invalid File Header, FID: 15499, LBN: 1203844I -DSKB-E-HDRINVFID, FH2$W_FID_NUM (byte 8) is 0, could be a deleted file1 FID: 15499 LBN: 1203844 [RANCE]FILE.EXT;11 FID: 20111 LBN: 370067 [RANCE]FILE.EXT;41 FIcD: 108520 LBN: 2045192 [RANCE]FILE.EXT;3' DISKBLOCK> DIR /BACKFID=2301 /DELETED1 FID: 15499 LBN: 1203844 [RANCE]FILE.EXT;1B DISKBLOCK> DIR /VALID /BACKFID=2301 /MODIFIED /SINCE=01-JAN-19931 FID: 20111 LBN: 370067 [RANCE]FILE.EXT;4& DISKBLOCK> DIR /LBN=(1000,1200,5000), DISKBLOCK> DIR /LBN=1000 /COUNT=500 /VALIDF This command will locate file headers that map any LBNs in the rangeF 1000, 1001, 1002, ... 1498, 1499. It will continue scanning to the G en dd of INDEXF.SYS even after all matches have been found and multiplyG allocated blocks will be reported against all valid headers. InvalidA or deleted headers which map any of these LBNs will be ingored.= DISKBLOCK> DIRECTORY /LBN=(1000,2000,3000) /COUNT=(10,10,5)J This command will locate file headers that MAP any of the following LBNs< 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009< 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009$ 3000, 3001, 3002, 3003, e3004, 3004B If any of these LBNs is mapped by multiple file headers then allH file names will be reported, even if one or more of them is a DELETED G or INVALID file header. The filenames will be reported in FID order G and the command will not finish until ALL file headers in INDEXF.SYS  have been checked.ww­s,‡ôˆˆ´1 DUMP9 Use the dump command to dump the entire contents of the# 512 byte buffer to your terminal.6 The contents will be ALL 0s if you have not fissued a READ or WRITE command2 Command_Qualifiers/HEX (default)? Use the /HEX switch to cause the data to be displayed in HEX,@ this is the default behaviour. The addresses displayed to theB right of the data are also in HEX. The data bytes are layed out3 the same way as the output of a DCL DUMP command.@ 31 30 29 28 ............................ 3 2 1 0 Address DISKBLOCK> DUMP DISKBLOCK> DUMP /HEX/OCTALC Use the /OCTAL switch to specify that the contgents of the buffer,A and the addresses printed next to the data, should be displayed in OCTAL.@ 24 23 22 21 ............................ 3 2 1 0 Address DISKBLOCK> DUMP /OCTAL/ASCIIA Use the /ASCII switch to dump the entire contents of the bufferB to your terminal with all bytes interpreted as ASCII characters.1 Every non printing character will appear as a .B The data will be printed with the least significant byte on the ) left (similar to the DCL dump commanhd). DISKBLOCK> DUMP /ASCII /FILE_HEADERJ Use the /FILE_HEADER switch to format the buffer as an ODS2 file header.$ This command executes in 5 stages.A 1) Check that buffer is a valid file header, if not then print 5 an error message explaining what the problem is.6 2) Write the buffer out to SYS$SCRATCH:DISKBLOCK.TMPG 3) Spawn the command $ DUMP /FILE_HEADER SYS$SCRATCH:DISKBLOCK.TMP -> /OUTPUT=SYS$SCRATCH:DISKBLOCK.TMP1 -= 4) Read SYS$SCiRATCH:DISKBLOCK.TMP1 and output to the screen (and log file if open). 5) Delete temporary files/BCK6 DUMP /BCK formats the buffer as a Backup header block/HEADER1 DUMP /HEADER is a synonym for DUMP /FILE_HEADER/HOMEB Use the /HOME switch to format the buffer as an ODS2 Home Block./SCB K Use the /SCB switch to format the buffer as an ODS2 Storage Control BlockD (The SCB can be read from VBN 1 of [000000]BITMAP.SYS. If you areG reading from a shadow set memb jer then you may wish to use the commandK READ /SCB since you cannot access the file system on shadow set members)./BLOCKB Use this qualifier to dump a formatted block without overwritingI DISKBLOCKs main read/write buffer. You must specify a Block number to  read.I DISKBLOCK will read the specified LBN / VBN into a temporary buffer andH immediately display it on the screen. The main read/write buffer will& still contain its original contents.% e.g. DISKBLOCK> DUMP /HOMEk /BLOCK=1) DISKBLOCK> DUMP /ASCII /BLOCK=1000/FIDB Use this qualifier to dump a formatted block without overwritingJ DISKBLOCKs main read/write buffer. You must specify the FID of the file header to read.% e.g. DISKBLOCK> DUMP /HEADER /FID=4ww­s,‡ôˆˆ´ 1 EXAMINEH Use the examine command to examine a particular address in the buffer.H You must specify an address within the 512 byte buffer. The data willG be shown in Hex, Octal, Decimal and Ascii. The ldefault radix for theF address is decimal but you may use the %X or %O operators to specify a Hex or Octal buffer address.5 The maximum buffer address for EXAMINE /TIME is 5045 The maximum buffer address for EXAMINE /LONG is 5085 The maximum buffer address for EXAMINE /WORD is 5105 The maximum buffer address for EXAMINE /BYTE is 511 DISKBLOCK> EXAMINE 480 2 Parameter Address- Specifies the buffer address to be examined2 Command_Qualifiers/LONG (default)m@ Causes the formatted output to show four bytes starting at the specified address DISKBLOCK> EXAMINE /LONG %X1E0/WORD? Causes the formatted output to show two bytes starting at the specified address. DISKBLOCK> EXAMINE /WORD %O123/BYTE> Causes the formatted output to show one byte starting at the specified address. DISKBLOCK> EXAMINE /BYTE %X53/TIMEG Causes the quadword starting at the specified address to be formatted* as a VMS Date Time string annd displayed.ww­s,‡ôˆˆ´ 1 DEPOSITF Use the deposit command to deposit new data to a particular locationI in the buffer. You must specify an address within the 512 byte buffer.H You must also specify up to a longword of data. The default radix forH the address and data is decimal but you may use the %X or %O operators to specify HEX or OCTAL. DISKBLOCK> DEPOSIT %X1F %X4142 | |( | +-------Data+ o +-------------Address 2 Parameters Address. Specifies the buffer address to be deposited Date2 Specifies the Data to be deposited to the buffer 2 Command_Qualifiers/LONG (default)D Causes the deposit to modify four bytes. (Address) to (Address+3), The address should lie in the range 0-508.+ DISKBLOCK> DEPOSIT /LONG %X1F %O124207651/WORDC Causes the deposit to modify two bytes. (Address) to (Address+1), The address should lie in the range 0-510.p# DISKBLOCK> DEPOSIT /WORD 123 4142/BYTEI Causes the deposit to modify just one byte at at the specified address., The address should lie in the range 0-511.& DISKBLOCK> DEPOSIT /BYTE %O10 %X4142/STRING7 Causes the DATA to be interpreted as an ASCII string.I The address should be sufficiently small so that ALL of the string will# fit between ADDRESS and byte 512.B To include lower case letters, or spaces, you must use "Quotes".) DISKBLOCK> DEPOSIT /STRING 410 NqEW_DATA+ DISKBLOCK> DEPOSIT /STRING 410 "New Data"/TIMED Causes the DATA to be interpreted as a VMS ASCII Date-Time string.E The input string is NOT THE SAME SYNTAX AS A DCL DATE TIME STRING, F this is necessary because DCL converts delta times to absolute times0 and we need to handle them as raw delta times.& The syntax for a DATE TIME string is% DELTA TIME: "dd hh:mm:ss.hh". ABSOLUTE TIME: "dd-mmm-yyyy hh:mm:ss.cc"& Valid datetime strings would include r= 9-jan-1991 9th January 1991 at the current time> "9-" 9th of this month at the current time0 "9-JAN-1991 00:00:00." Midnight on 9th JanuaryH "9-JAN-1991 00:00:00" Midnight " " " current hundredths of a sec . 30 Delta time of 30 days; "12 12:" Delta time of 12 days and 12 hours4 "0 ::.5" Delta time of half a secondA Eight bytes (Address) to (Address+7) will be deposited wsith the) corresponding VMS Quadword date time. 0 The address should lie in the range 0 to 504 7 DISKBLOCK> DEPOSIT /TIME 60 "29-JUL-1992 04:33:21.05"$ DISKBLOCK> DEPOSIT /TIME 0 12 00:ww­s,‡ôˆˆ´1 FILLG The fill command fills the internal data buffer with a repeated value e.g.( FILL 0 clear the entire bufferD FILL /BYTE 2 fill the buffer with a repeated %x02020202 pattern FILL /LONG %X12345678 2 Parameter Data2 Specifies the datta to be deposited to the buffer2 Command_Qualifiers/LONGWORD (default)B Specifies that the data is to be written to successive Longwords within the buffer& DISKBLOCK> FILL /LONGWORD %X80123456 or DISKBLOCK> FILL 0/WORD> Specifies that the data is to be written to successive words within the buffer DISKBLOCK> FILL /WORD %X3456 or DISKBLOCK> FILL /WORD 512/BYTE> Specifies that the data is to be written to successive bytes within the bufferu DISKBLOCK> FILL /BYTE %XA or DISKBLOCK> FILL /BYTE 127ww­s,‡ôˆˆ´ 1 CHECKSUM (see also WRITE /CHECKSUM)J Calculates and displays a 16 bit checksum for the buffer. The algorithmA used is the same as that used for an ODS2 file header checksum. I If you wish to write this checksum to the disk you should deposit it toI the last word location in the buffer before writing the buffer to disk, by using either' DISKBLOCK> DEPOSIT /WORD 510 nnnnn or!v DISKBLOCK> CHECKSUM /DEPOSIT2 Command_Qualifiers/DEPOSITC Causes the newly calculated checksum to be written to word 510 ofA the buffer. The checksum will be displayed at the terminal and; (if it was changed) the previous value will be displayed./HOMEF Causes the checksum command to check or modify BOTH of the checksums) in a Home block (word 58 and word 510). See also ODS2 HOMEww­s,‡ôˆˆ´1 SAVEI The SAVE command can be used to save data to aw standard RMS file beforeJ making modifications in order to be able to RESTORE the same data later.? This may enable you to "undo" any damage caused by a mistake.E You may supply a filespec for the file which will be created (on a ? FILES11 device). The default filespec for this operation is  SYS$SCRATCH:DISKBLOCK.DMP) DISKBLOCK> SAVE SYS$LOGIN:BLOCK_234.DMP 2 Parameter Filename* Specifies the name of the file to create 2 Qualifier/BLOCKS /BLOCKS=(keywor xd[,...])I Using the /BLOCKS switch you can specify a starting block and an endingD block or a count of the number of blocks to save. You can specifyD both a START block and an END block, or a START block and a COUNT,4 you may not specify both an END block and a COUNT.< The default START block is 0 for a DRIVE and 1 for a FILE., DISKBLOCK> SAVE /BLOCKS=(START:0,COUNT:10)< This command will save blocks 0 through 9 in a file called sys$scratch:diskblock.dmp@ DISKBLOCK> SAVE /B yLOCKS=(START=0,END=9) SYS$LOGIN:10BLOCKS.TMP< This command will save blocks 0 through 9 in a file called sys$login:10blocks.tmpww­s,‡ôˆˆ´ 1 RESTOREI Use the RESTORE command to restore data from a file created by the SAVEI command. If you do not specify /BLOCKS then the data will be restored K to the 512 byte main read write buffer. If you specify /BLOCKS then the 5 data will be restored to the selected disk or file.C The file must have been previously created wzith a DISKBLOCK> SAVE@ command. You may supply a filespec for the file. The default: filespec for this operation is SYS$SCRATCH:DISKBLOCK.DMP, DISKBLOCK> RESTORE SYS$LOGIN:BLOCK_234.DMP 2 Parameter Filename( Specifies the name of the file to open 2 Qualifier/BLOCKS /BLOCKS=(keyword[,...])I Using the /BLOCKS switch you can specify a starting block and an endingG block or a count of the number of blocks to restore. You can specifyD both a START block and an END {block, or a START block and a COUNT,4 you may not specify both an END block and a COUNT.< The default START block is 0 for a DRIVE and 1 for a FILE.K DISKBLOCK does not check that the file is the correct size for the numberI of blocks specified and I have never tested the effects of getting this wrong!/ DISKBLOCK> RESTORE /BLOCKS=(START:0,COUNT:10)A This command will restore blocks 0 through 9 from a file called sys$scratch:diskblock.dmpC DISKBLOCK> RESTORE /BLOCKS=(ST|ART=0,END=9) SYS$LOGIN:10BLOCKS.TMPA This command will restore blocks 0 through 9 from a file called sys$login:10blocks.tmpww­s,‡ôˆˆ´1 SEARCHB Use the search command to scan a range of Logical Blocks on the C selected drive, or a range of Virtual blocks in the selected file; looking for a particular string of characters or Integer.; A search of a disk will run at almost the maximum spiral  read rate of the disk.G You can obtain a status report showing the l }ast block checked and the= time by typing ^T (control T) whilst the search is running.5 You can cancel the search by typing ^C (control C).; You must SELECT a drive/file before issuing this command.K Due to the algorithm used it cannot be guaranteed that a match that spansK block boundaries will be reported. Diskblock works with buffers that areM (approximately) one track in size, any data that spans two of these buffers, will not generate a match during a search.2 Comman~d_Qualifiers/OUTPUT /OUTPUT=filespec@ Use the /OUTPUT qualifier to cause the output to be written to= a file instead of to the terminal. The default filespec is SYS$SCRATCH:DISKBLOCK.LISH This qualifier does not support the use of extended filename syntax on@ ODS5 disks, the output file must have an ODS2 style file name.C This is useful if searching a large number of blocks for a stringC or integer which is fairly frequent. You can still use ^T to get@ a status display to the terminal. You may examine the output? file from another session with the type command, whilst it is still being written.> DISKBLOCK> SEARCH /LONG=123456 /OUTPUT=SYS$LOGIN:123456.LIST See also SET LOG /LONGWORD /LONGWORD=valueJ Use SEARCH /LONGWORD to search for an occurence of a longword integer on the selected drive/file.@ There are no alignment requirements so a longword starting at . (e.g.) byte 1 of a block will be discovered.( DISKBLOCK> SEARCH /LON€GWORD=%X80123456 or! DISKBLOCK> SEARCH /LONG = 12345/WORD /WORD=valueB Use SEARCH /WORD to search for an occurence of a word integer on the selected drive/file.< There are no alignment requirements so a word starting at . (e.g.) byte 1 of a block will be discovered. DISKBLOCK> SEARCH /WORD=%XFFFF or! DISKBLOCK> SEARCH /WORD = 12345/BYTE /BYTE=valueB Use SEARCH /BYTE to search for an occurence of a byte integer on the selected drive/file. DISKBLOCK> SEARCH /BYTE=%XFF or DISKBLOCK> SEARCH /BYTE = 127/STRING /STRING=value /STRING="value"G Use SEARCH /STRING to search for an occurence of an ASCII text string on the selected drive/fileH The input string will be converted to upper case UNLESS it is enclosed in quotes.( DISKBLOCK> SEARCH /STRING = INDEXF.SYS orJ DISKBLOCK> SEARCH /STRING="Case Sensitive" /BLOCK=(START=100, COUNT=100)/HEADER /HEADER=filespecD Use SEARCH / HEADER to search for file headers. ‚ It can be used toF locate the header for a file on a disk that has no valid indexf.sys.F For each file header located it will display LBN and Filename. You = can obtain more information by specifying the /FULL switch. F If the indexf.sys is present and valid then the DIRECTORY command is much quicker, DISKBLOCK> SEARCH /HEADER! DISKBLOCK> SEARCH /HEADER=*.RDB( DISKBLOCK> SEARCH /HEADER=000000.DIR;1+ DISKBLOCK> SEARCH /HEADER=LOGIN.COM /FULL/BCK /BCK=filename6 Usƒe SEARCH / BCK to search for backup header blocks.C Use the optional filename to specify the name of the saveset file DISKBLOCK> SEARCH /BCK% DISKBLOCK> SEARCH /BCK=DISKBLOCK*.* /OFFSET /OFFSET=value= Use SEARCH / OFFSET to restrict your search to a particular? offset in the blocks searched. For example if you search for ? a value with /OFFSET=0 then only blocks that start with that % particular value will be displayed.8 The /OFFSET switch cannot be used with /HEADER„ or /BCK2 DISKBLOCK> search /string=DECFILE11B /offset=496/ DISKBLOCK> search /long=%X80123456 /offset=28/FULL0 This switch is only valid with SEARCH /HEADER.< It produces a second line of output for each header found.@ This displays FID, Extension Segment number and Creation Date. /BLOCKS /BLOCKS=(keyword[,...])I Using the /BLOCKS switch you can specify a starting block and an endingF block or a count of the number of blocks to search. You can specifyD both a START b …lock and an END block, or a START block and a COUNT,4 you may not specify both an END block and a COUNT.< The default START block is 0 for a DRIVE and 1 for a FILE.C DISKBLOCK> SEARCH /BLOCKS=START:%X40 /STRING="String to look for"< This command will search all blocks starting from block 64> DISKBLOCK> SEARCH /BLOCKS=(START:64,END=80) /LONG=%XFFFFFFFF* This command will search blocks 64 to 80A DISKBLOCK> SEARCH /BLOCKS=(START=%X40, COUNT=16) /WORD=%O177777* This command will †search blocks 64 to 80. DISKBLOCK> SEARCH /BLOCKS=END:%X20 /BYTE=127A This command will search blocks 0 to 32 if a DRIVE is selected.6 It will search blocks 1 to 32 if a file is selected. 2 Using_^T% Searching a whole drive can be slow< (RA60=17mins, RA90=100 mins if there is no other activity)> To check on progress you may type ^T (Control T) at any time> during a search. This will cause a line to be output showing, the last blocks read and the current time. For Example: ‡# DISKBLOCK> SEARCH /STRING="Ascii"C %DSKB-I-SEARCHING, Searching blocks 0 - nn for string "Ascii"....9 %DSKB-I-CONTROL_T, Just checked block 10008 at 18:07:43 2 ExamplesC DISKBLOCK> SEARCH /BLOCKS=START:%X40 /STRING="String to look for"I This command will search all blocks starting from block 64 for the text> DISKBLOCK> SEARCH /BLOCKS=(START:64,END=80) /LONG=%XFFFFFFFFB This command will search blocks 64 to 80 for an all 1's longwordA DISKBLOCK> SEARCH /BLOCKS=(START=%X40, ˆ COUNT=16) /WORD=%O177777> This command will search blocks 64 to 80 for an all 1's word. DISKBLOCK> SEARCH /BLOCKS=END:%X20 /BYTE=127G This command will search blocks 0 to 32 of a DISK for an all 1's byte6 It will search blocks 1 to 32 if a FILE is selected.F DISKBLOCK> SEARCH /STRING=INDEXF.SYS /OUTPUT=sys$scratch:indexf.listD This command will search the entire drive/file for the text stringC INDEXF.SYS It will create a file with the details of all matches.ww­s,‡ô ‰ˆˆ´1 SHOWI The show command gives information about the current DISKBLOCK session.G It tells you the full name of the selected drive or file, the maximumH block number on this drive or file, whether WRITEs are allowed or the; selection is READ_ONLY, the number of the last block readA or written, whether the buffer has been modified since the lastI read/write and it displays the Indexfile mapping pointers if available. DISKBLOCK> SHOW 2 ExampleB%DSKB-I-DISKSEL, Disk _$1$ ŠDUC45 has LBNs 0 to 2376152 (%X002441D8)-%DSKB-I-WRTENAB, Operating in READ/WRITE mode5%DSKB-I-NOTACCES, No blocks have been read or writtenO%DSKB-I-BUFNOTMOD, Buffer HAS NOT been modified since last Read/Write operation:%DSKB-I-INDEXFMAP, Index File has been successfully mapped8%DSKB-I-FACTOR, Factor=85, FID 1 is VBN 86 of Index File2 Count: 6 LBN: 02 Count: 3 LBN: 9662 Count: 3 LBN: 12144122 ‹ Count: 26139 LBN: 11882732 Count: 1002 LBN: 16943762 Count: 1002 LBN: 3694652 Count: 1002 LBN: 1769792 Count: 1002 LBN: 1647219ww­s,‡ôˆˆ´1 SETG The set command defines or changes some characteristic of the current DISKBLOCK SESSION. 2 WRITED The set write command enables writing of the selected DISK or FILEG the set nowrite command disables wriŒting of the selected DISK or FILE$ This will override a setting from  DISKBLOCK> SELECT /[NO]WRITE2 LOGH SET LOG causes all output to be written to a logfile as well as to theB terminal screen. You may specify a filename for the log file. 3 The default logfile is SYS$SCRATCH:DISKBLOCK.LOG.F This command does not support the use of extended filename syntax on< ODS5 disks, the logfile must have an ODS2 style file name.@ Opening a new logfile causes the current logfile to be closed.3 Command_Qualifiers/CLOSEG The command SET LOG /CLOSE closes the currently open log file without opening a new logfile. 3 Example DISKBLOCK> SET LOG DISK_3@ %DSKB-I-CREATED, Created file DISK$USERS_2:[RANCE]DISK_3.LOG;1 DISKBLOCK> SET LOGD %DSSKB-I-LOGCLOSE, Logfile DISK$USERS_2:[RANCE]DISK_3.LOG;1 closedC %DSKB-I-CREATED, Created file DISK$USERS_2:[RANCE]DISKBLOCK.LOG;1 DISKBLOCK> SET LOG/CLOSEG %DSSKB-I-LOGCLOSE, Logfile DISK$USERS_2:[RANCE]DISKBLOCK.LŽOG;1 closed DISKBLOCK>2 PAGEH The command SET PAGE causes diskblock to count lines of output sent toJ the terminal and prompt with "Type a to continue: " every 22 lines.A This feature is enabled by default IF SYS$OUTPUT IS A TERMINAL.# Set NOPAGE disables this feature.ww­s,‡ôˆˆ´1 SPAWNK Spawns a new subprocess, suspending but not ending your current DISKBLOCKH session. This is useful if you wish to use some other utility such as3 DUMP without losing your current process context. DISKBLOCK> SPAWN: $ DUMP /HEADER /BLOCK=COUNT=0 $1$dja4:[000000]indexf.sys9 -------------------------------------------------------9 --------Formatted file header appears here-------------9 ------------------------------------------------------- $ lo DISKBLOCK># DISKBLOCK> SPAWN SHOW DEVICE DJA4 2 Parameter Command_String: Specifies a command string to be performed when the DCL  subprocess is activeww­s,‡ôˆˆ´1 ATTACHC Permits you to switch control of your terminal from your current ) process to another process in your job. 2 Parameter  Process_NameA Specifies the name of a parent process or spawned subprocess toB which control passes. The process must already exist, be part ofC your current job, and share the same input stream as your currentC process. However, the process cannot be your current process or a0 subprocess created with the /NOWAIT qualifier. 2 Example MAIL> ‘SPAWN $ SET PROCESS /NAME=DISKBLOCK $ MC DISKBLOCK DISKBLOCK> ATTACH MAIL You have 3 new messages  MAIL> ATTACH DISKBLOCK DISKBLOCK>ww­s,‡ôˆˆ´1 ODS2E The format of an ODS2 file header supplied here can be used to findF specific fields and flags within a file header to be altered. It isE important to calculate a new checksum using the checksum command ifF any part of a file header is altered, this checksum is calculated byC adding together all word ’s in the buffer, discarding any overflow.I The home block has two checksums the checksum at byte 510 is calculatedF the same way as a file header checksum. The checksum at byte 58 is C calculated by adding together the first 29 words in the block and discarding any overflow. 2 INDEXF.SYSC The beginning of INDEXF.SYS is used for Home Blocks, Bitmaps etc.8 To find the file header for a file with file id of nnn3 FACTOR = (4 * hm2$w_cluster) + hm2$w_ibmapsize6 VBN of fi “le header for file id nnn = FACTOR + nnn1 To access File Headers on an ODS2 drive you can3 DISKBLOCK> SELECT/FILE $n$dcun:[000000]INDEXF.SYS 2 Home_block& The layout of an ODS2 home block is.I <------------------------HM2$L_HOMELBN-------------------------------->I <------------------------HM2$L_ALHOMELBN------------------------------>I <------------------------HM2$L_ALTIDXLBN------------------------------>I <---------HM2$W_CLUSTER---------> <--------HM2$W_STRUCLEV-------”-->I <---------HM2$W_ALHOMEVBN-------> <--------HM2$W_HOMEVBN---------->I <---------HM2$W_IBMAPVBN--------> <--------HM2$W_ALTIDXVBN-------->I <------------------------HM2$L_IBMAPLBN------------------------------->I <------------------------HM2$L_MAXFILES------------------------------->I <---------HM2$W_RESFILES--------> <--------HM2$W_IBMAPSIZE-------->I <---------HM2$W_RVN-------------> <--------HM2$W_DEVTYPE---------->I <---------HM2$W_VOLCHAR---------> <---•-----HM2$W_SETCOUNT--------->I <------------------------HM2$L_VOLOWNER------------------------------->I <------------------------HM2$L_SEC_MASK------------------------------->I <---------HM2$W_FILEPROT--------> <--------HM2$W_PROTECT---------->I <---------HM2$W_CHECKSUM1-------> <--------HM2$W_RECPROT---------->I -------------------------HM2$Q_CREDATE-------------------------------->I <----------------------------------------------------------------------E <---------HM2$W_–EXTEND----------> HM2$B_LRU_LIM HM2$B_WINDOWI -------------------------HM2$Q_RETAINMIN------------------------------>I <----------------------------------------------------------------------I -------------------------HM2$Q_RETAINMAX------------------------------>I <----------------------------------------------------------------------I -------------------------HM2$Q_REVDATE-------------------------------->I <---------------------------------------------------------------------—-I -------------------------HM2$R_MIN_CLASS (20 bytes)------------------->I <----------------------------------------------------------------------I -------------------------HM2$R_MAX_CLASS (20 bytes)------------------->I <----------------------------------------------------------------------I -------------------------reserved (320 bytes)---------------------->I <----------------------------------------------------------------------I <------------------------HM2$L_SERIALNUM----˜-------------------------->I -------------------------HM2$T_STRUCNAME (12 bytes)------------------->I <----------------------------------------------------------------------I -------------------------HM2$T_VOLNAME (12 bytes)------------------->I <----------------------------------------------------------------------I -------------------------HM2$T_OWNERNAME (12 bytes)------------------->I <----------------------------------------------------------------------I ------------------™-------HM2$T_FORMAT (12 bytes)------------------->I <----------------------------------------------------------------------I <---------HM2$W_CHECKSUM2-------> <--------reserved---------------> 3 HOMELBN HM2$L_HOMELBN! Starting byte - 0' Size - 4 bytes= Meaning - LBN of home (i.e. this) block 3 ALHOMELBN HM2$L_ALHOMELBN! Starting byte - 4' Size - 4 bytes; Meaning š - LBN of alternate home block 3 ALTIDXLBN HM2$L_ALTIDXLBN! Starting byte - 8' Size - 4 bytesB Meaning - LBN of alternate index file header 3 STRUCLEV HM2$W_STRUCLEV" Starting byte - 12' Size - 2 bytes6 Meaning - volume structure level6 always %X0201 for ODS2 3 STRUCVER HM2$B_STRUCVER" Starting byte › - 12& Size - 1 byte8 Meaning - structure version number1 always 1 for ODS2 3 STRUCLEV_B HM2$B_STRUCLEV" Starting byte - 13& Size - 1 byte4 Meaning - main structure level1 always 2 for ODS2 3 CLUSTER HM2$W_CLUSTER" Starting byte - 14' Size - 2 bytes= Meaning œ - storage bitmap cluster factor 3 HOMEVBN HM2$W_HOMEVBN" Starting byte - 16' Size - 2 bytes= Meaning - VBN of home (i.e. this) block 3 ALHOMEVBN HM2$W_ALHOMEVBN" Starting byte - 18' Size - 2 bytes; Meaning - VBN of alternate home block 3 ALTIDXVBN HM2$W_ALTIDXVBN" Starting byte - 20' Size - 2 bytesB Meaning - VBN of alternate index file header 3 IBMAPVBN HM2$W_IBMAPVBN" Starting byte - 22' Size - 2 bytes8 Meaning - VBN of index file bitmap 3 IBMAPLBN HM2$L_IBMAPLBN" Starting byte - 24' Size - 4 bytes8 Meaning - LBN of index file bitmap 3 MAXFILES HM2$L_MAXFILES" Starting byte - 28' Size - ž 4 bytesA Meaning - maximum number of files on volume 3 IBMAPSIZE HM2$W_IBMAPSIZE" Starting byte - 32' Size - 2 bytes> Meaning - index file bitmap size, blocks 3 RESFILES HM2$W_RESFILES" Starting byte - 34' Size - 2 bytesB Meaning - number of reserved files on volume 3 DEVTYPE HM2$W_DEVTYPE" Starting byte - 36' ŸSize - 2 bytes0 Meaning - disk device type3 RVN HM2$W_RVN" Starting byte - 38' Size - 2 bytesE Meaning - relative volume number of this volume 3 SETCOUNT HM2$W_SETCOUNT" Starting byte - 40' Size - 2 bytes7 Meaning - count of volumes in set 3 VOLCHAR HM2$W_VOLCHAR" Starting byte - 42' Size  - 2 bytes6 Meaning - volume characteristics 4 READCHECK HM2$V_READCHECK" Starting byte - 42! Bit number - 0: Meaning - verify all read operations 4 WRITCHECK HM2$V_WRITCHECK" Starting byte - 42! Bit number - 1; Meaning - verify all write operations4 ERASE HM2$V_ERASE" Starting byte - 42! Bit number¡ - 29 Meaning - erase all files on delete 4 NOHIGHWATER HM2$V_NOHIGHWATER" Starting byte - 42! Bit number - 3; Meaning - turn off high-water marking 4 CLASS_PROT HM2$V_CLASS_PROT" Starting byte - 42! Bit number - 4< Meaning - enable classification checks 3 VOLOWNER HM2$L_VOLOWNER" Starting byte - 44' Size ¢ - 4 bytes0 Meaning - volume owner UIC 3 SEC_MASK HM2$L_SEC_MASK" Starting byte - 48' Size - 4 bytes4 Meaning - volume security mask 3 PROTECT HM2$W_PROTECT" Starting byte - 52' Size - 2 bytes6 Meaning - volume protection code4 bits <0:3> System3 bits <4:£7> Owner3 bits <8:11> Group3 bits <12:15> World Within each 4 bit field7 bit 0 Set to deny read access8 bit 1 Set to deny write access: bit 2 Set to deny execute access9 bit 3 Set to deny delete access 3 FILEPROT HM2$W_FILEPROT" Starting byte - 54' Size - 2 bytes7 Meanin¤g - default file protection2 not currently used 3 RECPROT HM2$W_RECPROT" Starting byte - 56' Size - 2 bytes> Meaning - default file record protection2 not currently used 3 CHECKSUM1 HM2$W_CHECKSUM1" Starting byte - 58' Size - 2 bytes. Meaning - first checksumG ¥ Use DISKBLOCK> CHECKSUM/HOME command toC calculate a new checksum if needed. 3 CREDATE HM2$Q_CREDATE" Starting byte - 60' Size - 8 bytes= Meaning - Quadword Volume Creation date3 WINDOW HM2$B_WINDOW" Starting byte - 68& Size - 1 byte3 Meaning - default window size 3 LRU_LIM HM2$B_LRU_LIM" Starting byte ¦ - 69& Size - 1 byte1 Meaning - default LRU limitE (number of directories in dir access cache)3 EXTEND HM2$W_EXTEND" Starting byte - 70' Size - 2 bytes3 Meaning - default file extend 3 RETAINMIN HM2$Q_RETAINMIN" Starting byte - 72' Size - 8 bytesE Meaning - minimum time between§ current time and0 file expiration. 3 RETAINMAX HM2$Q_RETAINMAX" Starting byte - 80' Size - 8 bytesE Meaning - maximum time between current time and0 file expiration. 3 REVDATE HM2$Q_REVDATE" Starting byte - 88' Size - 8 bytes4 Meaning - Volume revision date? (e.g. da¨te of last full backup) 3 MIN_CLASS HM2$R_MIN_CLASS" Starting byte - 96( Size - 20 bytes 3 MAX_CLASS HM2$R_MAX_CLASS# Starting byte - 116( Size - 20 bytes 3 SERIALNUM HM2$L_SERIALNUM# Starting byte - 456' Size - 4 bytes: Meaning - pack (media) serial number 3 STRUCNAME HM2$T_STRUCNAME# Starting byte - 460( ©Size - 12 bytesI Meaning - Name of the volume set (from MOUNT /BIND)@ (padded with spaces, ASCII %X20) 3 VOLNAME HM2$T_VOLNAME# Starting byte - 472( Size - 12 bytes+ Meaning - Volume name@ (padded with spaces, ASCII %X20) 3 OWNERNAME HM2$T_OWNERNAME# Starting byte - 484( Size - ª 12 bytes, Meaning - Volume Owner@ (padded with spaces, ASCII %X20)3 FORMAT HM2$T_FORMAT# Starting byte - 496( Size - 12 bytes. Meaning - "DECFILE11B " 3 CHECKSUM2 HM2$W_CHECKSUM2# Starting byte - 510' Size - 2 bytes/ Meaning - second checksumB Use DISKBLOCK> CHECKSUM co«mmand toC calculate a new checksum if needed. 2 File_HeaderH In order for an ODS2 file header to be valid the following conditions  must be met.; 1) FH2$B_IDOFFSET must point to a byte which is beyond FH2$L_HIGHWATERG 2) FH2$B_IDOFFSET must be less than or equal to FH2$B_MPOFFSET G 3) FH2$B_MPOFFSET must be less than or equal to FH2$B_ACOFFSET G 4) FH2$B_ACOFFSET must be less than or equal to FH2$B_RSOFFSET ¬@ 5) The high byte of FH2$W_STRUCLEV must contain the value 2; 6) The low byte of FH2$W_STRUCLEV must be 1 or greaterA 7) FH2$W_FID_NUM + FH2$B_FID_NMX must contain the FID number5 8) FH2$W_MAP_INUSE must be less than or equal to' FH2$B_ACOFFSET - FH2$B_MPOFFSET# 9) The Checksum must be valid. E A deleted file header conforms to the format of a valid file header! with the following differences.7 1) FH2$V_MARKDEL (bit 15) is set in FH2­$L_FILECHAR@ 2) FH2$W_FID_NUM, FH2$B_FID_NMX and FH2$B_FID_RVN are all 0 3) The checksum is 0' The layout of an ODS2 File Header is.I FH2$B_RSOFFSET FH2$B_ACOFFSET FH2$B_MPOFFSET FH2$B_IDOFFSETI <--------FH2$W_STRUCLEV---------> <---------FH2$W_SEG_NUM--------->I <--------FH2$W_FID_SEQ----------> <---------FH2$W_FID_NUM--------->H <--------FH2$W_EX_FIDNUM--------> FH2$B_FID_NMX FH2$B_FID_RVNI FH2$B_EX_FIDNMX FH2$B_EX_FIDRVN <-®-------FH2$W_EX_FIDSEQ-------->I <--------------------------------------------------------------------->I <------------------------FH2$W_RECATTR (32 bytes)--------------------->I <--------------------------------------------------------------------->I <------------------------FH2$L_FILECHAR------------------------------->I <--------FH2$W_BK_FIDNUM--------> <--------FH2$W_FILEPROT--------->I FH2$B_BK_FIDNMX FH2$B_BK_FIDRVN <--------FH2$W_BK_FIDSEQ-------->H <-------reserv¯ed (2 bytes)-----> FH2$B_RU_ACTIVE FH2$B_JOURNALI <------------------------FH2$L_HIGHWATER------------------------------>I <------------------------reserved (8 bytes)-------------------------->I <------------------------reserved------------------------------------->I <------------------------FH2$R_CLASS_PROT (20 bytes)----------------->I <--------------------------------------------------------------------->3 Ident, Map, ACL and Reserved areas! <--------FH2°$W_CHECKSUM-------> 3 IDOFFSET FH2$B_IDOFFSET! Starting byte - 0& Size - 1 byte: Meaning - ident area offset in wordsH Multiply by 2 to find address of ID area 3 MPOFFSET FH2$B_MPOFFSET! Starting byte - 1& Size - 1 byte8 Meaning - map area offset in wordsI Multiply by 2 to find address of M±AP area 3 ACOFFSET FH2$B_ACOFFSET! Starting byte - 2& Size - 1 byteC Meaning - access control list offset in wordsI Multiply by 2 to find address of ACL area 3 RSOFFSET FH2$B_RSOFFSET! Starting byte - 3& Size - 1 byte= Meaning - reserved area offset in wordsN Multiply by 2 to find address ²of RESERVED area 3 SEG_NUM FH2$W_SEG_NUM! Starting byte - 4& Size - 2 byte3 Meaning - file segment numberD segment number 0 is the first headerE segment number 1 is the second header$ etc. 3 STRUCLEV FH2$W_STRUCLEV! Starting byte - 6& Size - 2 byte4 Meaning - fi³le structure level7 normally 20001 for ODS2 3 STRUCVER FH2$B_STRUCVER! Starting byte - 6& Size - 1 byte6 Meaning - file structure version* 2 for ODS2 3 STRUCLEV_B FH2$B_STRUCLEV! Starting byte - 7& Size - 1 byte> Meaning - principal file structure level4 curren´tly 1 for ODS23 FID FH2$W_FID! Starting byte - 8' Size - 6 bytes8 Meaning - File Identifier, 3 words 3 FID_NUM FH2$W_FID_NUM! Starting byte - 8& Size - 2 byte+ Meaning - file number 3 FID_SEQ FH2$W_FID_SEQ" Starting byte - 10& Size - 2 byte4 Meaning - file sequence number 3 FID_RVNµ FH2$W_FID_RVN" Starting byte - 12& Size - 2 byte6 Meaning - relative volume number- (overlays FH2$B_FID_RVN and FH2$B_FID_NMX) 3 FID_RVN_B FH2$B_FID_RVN" Starting byte - 12& Size - 1 byte4 Meaning - alternate format RVN 3 FID_NMX FH2$B_FID_NMX" Starting byte - 13& Size - 1 byteF Meaning - alte¶rnate format file number extension 3 EXT_FID FH2$W_EXT_FID" Starting byte - 14' Size - 6 bytes9 Meaning - Extension File IdentifierA (File ID of next extension header) 3 EX_FIDNUM FH2$W_EX_FIDNUM" Starting byte - 14' Size - 2 bytes5 Meaning - extension file number 3 EX_FIDSEQ FH2$W_EX_FIDSEQ" Starting byte - · 16& Size - 2 byte> Meaning - extension file sequence number 3 EX_FIDRVN FH2$W_EX_FIDRVN" Starting byte - 18& Size - 2 byte@ Meaning - extension relative volume number1 (overlays FH2$B_EX_FIDRVN and FH2$B_EX_FIDNMX)3 EX_FIDRVN_B FH2$B_EX_FIDRVN" Starting byte - 18& Size - 1 byte> Meaning - alternate format¸ extension RVN 3 EX_FIDNMX FH2$B_EX_FIDNMX" Starting byte - 19& Size - 1 byteP Meaning - alternate format extension file number extension 3 RECATTR FH2$W_RECATTR" Starting byte - 20' Size - 32 byte1 Meaning - Record Attributes 3 FILECHAR FH2$L_FILECHAR" Starting byte - 52' Size - 4 bytes4 Meaning ¹ - file characteristics 4 WASCONTIG FH2$V_WASCONTIG" Starting byte - 52! Bit number - 0C Meaning - file was (and should be) contiguous 4 NOBACKUP FH2$V_NOBACKUP" Starting byte - 52! Bit number - 1; Meaning - file is not to be backed up 4 WRITEBACK FH2$V_WRITEBACK" Starting byte - 52! Bit number - 2= Meaning º - file may be write-back cached 4 READCHECK FH2$V_READCHECK" Starting byte - 52! Bit number - 3: Meaning - verify all read operations 4 WRITCHECK FH2$V_WRITCHECK" Starting byte - 52! Bit number - 4; Meaning - verify all write operations 4 CONTIGB FH2$V_CONTIGB" Starting byte - 52! Bit number - 5C Meaning » - keep file as contiguous as possible 4 LOCKED FH2$V_LOCKED" Starting byte - 52! Bit number - 67 Meaning - file is deaccess locked 4 CONTIG FH2$V_CONTIG" Starting byte - 52! Bit number - 72 Meaning - file is contiguous 4 BADACL FH2$V_BADACL" Starting byte - 52" Bit number - 11. Meaning - ¼ ACL is invalid4 SPOOL FH2$V_SPOOL" Starting byte - 52" Bit number - 127 Meaning - intermediate spool file 4 DIRECTORY FH2$V_DIRECTORY" Starting byte - 52" Bit number - 133 Meaning - file is a directory 4 BADBLOCK FH2$V_BADBLOCK" Starting byte - 52" Bit number - 148 Meaning - file contains bad blocks ½4 MARKDEL FH2$V_MARKDEL" Starting byte - 52" Bit number - 159 Meaning - file is marked for delete 4 NOCHARGE FH2$V_NOCHARGE" Starting byte - 52" Bit number - 16? Meaning - file space is not to be charged4 ERASE FH2$V_ERASE" Starting byte - 52" Bit number - 17C Meaning - erase file contents before deletion¾ 4 SHELVED FH2$V_SHELVED" Starting byte - 52" Bit number - 190 Meaning - File is shelved > (Heirarchical Storage Manager) 4 SCRATCH FH2$V_SCRATCH" Starting byte - 52" Bit number - 20? Meaning - Scratch header used by movefile 4 NOMOVE FH2$V_NOMOVE" Starting byte - 52" Bit number - 21= Meaning ¿ - Disable movefile on this file4 NOSHELVABLE FH2$V_NOSHELVABLE" Starting byte - 52" Bit number - 22A Meaning - File is not allowed to be shelved> (Heirarchical Storage Manager)4 SHELVING_RESERVED FH2$V_SHELVING_RESERVED" Starting byte - 52" Bit number - 23> Meaning - Reserved for shelving facility> À (Heirarchical Storage Manager) 3 RECPROT FH2$W_RECPROT" Starting byte - 56& Size - 2 byteE Meaning - record protection, not currently used 3 MAP_INUSE FH2$B_MAP_INUSE" Starting byte - 58& Size - 2 byte? Meaning - number of map area words in use 3 ACC_MODE FH2$B_ACC_MODE" Starting byte - 59& Size - 1 byÁte< Meaning - least privileged access mode/ bits <0:1> read0 bits <2:3> write2 bits <3:4> execute1 bits <5:6> delete 3 FILEOWNER FH2$L_FILEOWNER" Starting byte - 60& Size - 4 byte. Meaning - file owner UIC 3 UICMEMBER FH2$W_UICMEMBER" Starting byte - 60& SÂize - 2 byte1 Meaning - UIC member number 3 UICGROUP FH2$W_UICGROUP" Starting byte - 62& Size - 2 byte0 Meaning - UIC group number 3 FILEPROT FH2$W_FILEPROT" Starting byte - 64& Size - 2 byte/ Meaning - file protection4 bits <0:3> System3 bits <4:Ã7> Owner3 bits <8:11> Group3 bits <12:15> World Within each 4 bit field7 bit 0 Set to deny read access8 bit 1 Set to deny write access: bit 2 Set to deny execute access9 bit 3 Set to deny delete access 3 BACKLINK FH2$W_BACKLINK" Starting byte - 66& Size - 6 byte: MeaÄning - back link file Identifier,3 points to directory 3 BK_FIDNUM FH2$W_BK_FIDNUM" Starting byte - 66& Size - 2 byte5 Meaning - back link file number 3 BK_FIDSEQ FH2$W_BK_FIDSEQ" Starting byte - 68& Size - 1 byte> Meaning - back link file sequence number 3 BK_FIDRVN FH2$W_BK_FIDRVN" Starting byte Å - 70' Size - 2 bytes@ Meaning - back link relative volume number1 (overlays FH2$B_BK_FIDRVN and FH2$B_BK_FIDNMX)3 BK_FIDRVN_B FH2$B_BK_FIDRVN" Starting byte - 70& Size - 1 byte> Meaning - alternate format back link RVN 3 BK_FIDNMX FH2$B_BK_FIDNMX" Starting byte - 71& Size - 1 byteP Meaning - alternÆate format back link file number extension 3 JOURNAL FH2$B_JOURNAL" Starting byte - 72& Size - 1 byte5 Meaning - journal control flags 4 ONLY_RU FH2$V_ONLY_RU" Starting byte - 72! Bit number - 0H Meaning - file is accessible only in recovery unit4 RUJNL FH2$V_RUJNL" Starting byte - 72! Bit number - 1< Meaning Ç - enable recovery unit journal4 BIJNL FH2$V_BIJNL" Starting byte - 72! Bit number - 2; Meaning - enable before image journal4 AIJNL FH2$V_AIJNL" Starting byte - 72! Bit number - 3: Meaning - enable after image journal4 ATJNL FH2$V_ATJNL" Starting byte - 72! Bit number - 4: Meaning - enable audÈit trail journal 4 NEVER_RU FH2$V_NEVER_RU" Starting byte - 72! Bit number - 5I Meaning - file is never accessible in recovery unit4 JOURNAL_FILE FH2$V_JOURNAL_FILE" Starting byte - 72! Bit number - 66 Meaning - this is a journal file 3 RU_ACTIVE FH2$B_RU_ACTIVE" Starting byte - 73& Size - 1 byteJ Meaning É - If non-zero file has active recovery units 3 HIGHWATER FH2$L_HIGHWATER" Starting byte - 76& Size - 1 byte7 Meaning - high-water mark in file 3 CLASS_PROT FH2$R_CLASS_PROT" Starting byte - 88& Size - 1 byte< Meaning - security classification mask 3 CHECKSUM FH2$W_CHECKSUM# Starting byte - 510& Size - Ê 2 byte4 Meaning - file header checksum? Use DISKBLOCK> CHECKSUM command> to calculate a suitable value. 3 Ident_AreaI <------------------------FI2$T_FILENAME (20 bytes)------------------->I --------------------------------> <--------FI2$W_REVISION--------->I -------------------------FI2$Q_CREDATE---------------------------------I --------------------------------> <---------------------Ë-----------I -------------------------FI2$Q_REVDATE---------------------------------I --------------------------------> <--------------------------------I -------------------------FI2$Q_EXPDATE---------------------------------I --------------------------------> <--------------------------------I -------------------------FI2$Q_BAKDATE---------------------------------I --------------------------------> <--------------------------------I <------------------------FI2$T_FILÌENAMEEXT (66 bytes)----------------> 4 FILENAME FI2$T_FILENAME= Starting byte - Header + (2 * FH2$B_IDOFFSET)1 (Usually byte 80)( Size - 20 Bytes: Meaning - First 20 bytes of Filename? Paddes with spaces (ASCII %X20)> Continued in FI2$T_FILENAMEEXT 4 REVISION FI2$W_REVISIONB Starting byte - Header + (2 * ÍFH2$B_IDOFFSET) + 202 (Usually byte 100)' Size - 2 BytesA Meaning - Number of times the file has been4 accessed for writing 4 CREDATE FI2$Q_CREDATEB Starting byte - Header + (2 * FH2$B_IDOFFSET) + 222 (Usually byte 102)' Size - 8 BytesC Meaning - Quadword time when file was created 4 Î REVDATE FI2$Q_REVDATEB Starting byte - Header + (2 * FH2$B_IDOFFSET) + 302 (Usually byte 110)' Size - 8 Bytes@ Meaning - Quadword time when file was lastA closed after being open for write 4 EXPDATE FI2$Q_EXPDATEB Starting byte - Header + (2 * FH2$B_IDOFFSET) + 382 (Usually byte 118)' Size - Ï 8 Bytes? Meaning - Quadword time when file becomes5 eligible for deletion 4 BAKDATE FI2$Q_BAKDATEB Starting byte - Header + (2 * FH2$B_IDOFFSET) + 462 (Usually byte 126)' Size - 8 Bytes@ Meaning - Quadword time when file was last) backed up4 FILENAMEEXT FI2$T_FILENAMEEXTB Starting byte - Ð Header + (2 * FH2$B_IDOFFSET) + 542 (Usually byte 134)( Size - 66 bytes> Meaning - Continuation of filename after> first 20 bytes. Allows for anA 80 character filename followed by8 a 5 digit version number 3 Map_Area8 The map area starts at Header + (2 * FH2$W_MAPOFFSET)/ It consists of 1 or more retrieval poinÑters.5 Bits 14 and 15 of retrieval pointer show the type., Type 0 retrieval pointer is 2 bytes long.+ Type 1 retrieval pointer is 4 bytes long+ Type 2 retrieval pointer is 6 bytes long+ Type 3 retrieval pointer is 8 bytes long 4 Type_0< Retrieval pointer type 0 is a PLACEMENT retrieval pointer@ It consists of flags to specify how space should be allocatedD for the file. This is needed so that (e.g.) backup can duplicate+ the conditions when the file was createÒd5 EXACT FM2$V_EXACT/ Space must be allocated EXACTLY as specified5 ONCYL FM2$V_ONCYL+ Space is to be allocated on one cylinder5 LBN FM2$V_LBN= Space is to be allocated at the start of the LBN contained in the next retrieval pointer5 RVN FM2$V_RVN3 Space is to be allocated on the specified volume (The same one as this extent) 4 Type_1( Retrieval pointer type 1 has 4 bytes.0 It has an 8 bit count field = 1 to 256 blocks9 It has Óa 22 bit LBN field = LBN 0 to 4194304 (2**22)< 31 16 15 14 13 9 8 0= +--------------------+-----+--------------+-------------+= | FM2$W_LOWLBN | 0 1|FM2$V_HIGHLBN |FM2$B_COUNT1 |= +--------------------+-----+--------------+-------------+& FM2$W_LOWLBN = low 8 bits of LBN& FM2$V_HIGHVBN = high 6 bits of LBN' FM2$B_COUNT1 = number of LBN's - 1 4 Type_2' Retrieval pointer type 2 has 6 bytes2 It has a 14 bit c Ôount field = 1 to 16384 blocks< It has a 32 bit LBN field = LBN 0 to 4294967295 (2**32)< 31 16 15 14 13 0= +--------------------+-----+----------------------------+= | FM2$L_LBN2 | 1 0| FM2$V_COUNT2 |= +--------------------+-----+----------------------------+= | FM2$L_LBN2 |= +----------------------------------+' FM2$V_COUNTV = number Õ of LBN's - 1' FM2$L_LBN2 = LBN of first block. 4 Type_3' Retrieval pointer type 3 has 8 bytes7 It has a 30 bit count field = 1 to 1073741824 blocks< It has a 32 bit LBN field = LBN 0 to 4294967295 (2**32)< 31 16 15 14 13 0= +--------------------+-----+----------------------------+= | FM2$W_LOWCOUNT | 1 1| FM2$V_COUNT2 |= +--------------------+-----+----------------------------+= | Ö FM2$L_LBN3 |= +-------------------------------------------------------+7 FM2$V_COUNT2 = Most significant 14 bits of count8 FM2$W_LOWCOUNT = Least significant 16 bits of count( FM2$L_LBN3 = LBN of first block 3 ACL_areaC The access control list area starts at Header + FH2$W_ACLOFFSET.ww­Ó‡Šôˆˆ´1 ODS5_support4 Diskblock can read and write ODS2 and ODS5 disks.; Diskblock understands ODS5 home blocks and file× headers.; Diskblock will not create files with extended filenames.4 The following commands have full support for ODS5 SELECT DIRECTORY5 The following command has partial support for ODS5> COPY (Supports input ODS5 names, output ODS2 names only)A The following commands and qualifiers have no support for ODS5 SET LOG /OUTPUT qualifierA See the help text for the individual commands for more detailsww­Ó‡Šôˆˆ´1 Bug_reports>  Please send all bug reports and feedback about DISKBLOCK to stuart.rance@compaq.comwwº«ðÓ‡Šôˆˆ´ HALLE InstallationHELPOverviewExamples New_FeaturesSELECTDESELECTREADWRITEREWRITETEST COPY_FILE DIRECTORYDUMPEXAMINEDEPOSITFILLCHECKSUMSAVERESTORESEARCHSHOWSETSPAWNATTACHODS2 ODS5_support Bug_reports