BLKALC.LIT FUNCTION: To determine the current file allocation of a particular block on the specified device. HINTS/RESTRICTIONS: BLKALC may be run from any account on the system and will function for any device on the system. BLKALC does not require the bitmap to be intact for the device; however, the file directory system must be intact. FORMAT: .BLKALC {device:}{block}{switches} The device may be any device that the driver is resident for and is currently on the system. Multiple digit drive numbers are permitted. Block is the number of the block you wish to search for. The entry may be in either hex or octal depending on the current SETting. A hex block number must start with a numeric character. For example block F43 must be entered as 0F43. If the block number entry does not agree with the current SETting for hex or octal, the input block number will be incorrect. DEFAULTS: If no device is specified, then BLKALC will default to the device you are currently logged into. If no block number is entered on the command line, BLKALC will return and ask you the block you wish to search. OPTIONS: You may request BLKALC to look in only a specified account by using the /P switch on the command line. If you know, from a DSKANA that there is a faulty block but you don't know the file, then you can search just the PPN where the error occurred. The format is /P:[p,pn] 1 BLKALC will tell you it is searching the specified PPN and will return the file or that the block was not associated with a file in the specified PPN. OPERATION: 1. Type BLKALC followed by the device and block number you wish to search for. 2. BLKALC will determine the number of blocks on the specified device and return this number to the screen. If the block number entered is to large for the device BLKALC will return: ?Block number specified is too large for this device. 3. BLKALC will then determine if the block specified is a part of the bitmap or the Master File Directory (MFD). 4. Finally, BLKALC will begin to search the entire file structure of the device using the Master File Directory and all the User File Directories to search each file to determine the specified block's allocation. BLKALC will return a <.> to the screen as it reads each UFD entry and checks the associated file. A deleted file will result in a <.> being displayed; however, no further searching will occur. To remove deleted files from the UFD you should run DIRSEQ as described in the System Commands Reference Manual. 5. Upon finding the specified block, BLKALC will return the file specification and return to AMOSL. 6. If the block is not found after searching the entire file directory system, it is assumed the block is not allocated and the system will return: Block #____ has not been allocated! ERRORS: A. ^specification error: Your command line was of incorrect format. The ^ points to the location that BLKALC does not understand. B. ?Block number too large for this device. The number you have entered is larger than the number of blocks on the specified, or default device. 2 C. ?Block number specified is a negative octal number The number you have entered equates to a negative octal number. Check the block and try again. D. All other error messages are from AMOSL operating system CHARACTERISTICS: You can use BLKALC to determine the current file allocation of any block on any mounted device. BLKALC is both re-entrant and reusable. BLKALC is control C (^C) interruptable, if CTRLC is SET on the user's terminal. EXAMPLES: .BLKALC Block allocation search has been initiated on: DSK0 Enter the block number to be searched: 13 Block number to be searched: 13 ... Block # 13 has been found in the User File Directory DSK0:[1,2] .BLKALC DSK1: 13 Block allocation search has been initiated on: DSK1 Block number to be searched: 13 .... Block # 13 has been found in the User File Directory DSK1:[1,2] .BLKALC DSK1: 0 Block allocation search has been initiated on: DSK1 Block number to be searched: 0 Block zero is the device label block. BLKALC.LIT was written by: Quaker State Oil Refining Corp. Research Center Oil City, PA 16301 - March 1984 3 .