.PAPER SIZE 60,72 .LEFT MARGIN 9 .TITLE LBC - Logical Block Copy _. .BLANK 30 .CENTER;LBC - Logical Block Copy .BLANK .CENTER;V 89.052 .BLANK 10;.LEFT MARGIN +36 T. R. Wyant .BLANK 23-Feb-1989 .LEFT MARGIN -36 .PAGE .AUTOPARAGRAPH LBC (Logical Block Copy) is a disk oriented block copy program. It will copy a contiguous group of blocks between files or disks. LBC is not sensitive to the structure of the file or disk; non FILES-11 disks may be copied to other disks or container files, and their original structure preserved. LBC can be invoked in any of the standard ways available to an RSX utility. You can: .BLANK;.LEFT MARGIN +4;.NOFILL >RUN LBC Enter input device or file name: command .BLANK;.INDENT -4 or .BLANK >INS LBC >LBC Enter input device or file name: command .BLANK;.INDENT -4 or .BLANK >INS LBC >LBC command .BLANK;.FILL;.LEFT MARGIN -4 In the first two cases, you must terminate LBC by entering a control/Z in response to the input prompt. This is called interactive mode. In the last case, LBC terminates after executing your command; this is called command mode. The command interface is intended to be both simple and flexable. Command mode requires you to type a full command on one line. Interactive mode, on the other hand, will accept either a full command or a portion thereof at the "Enter device or file name" prompt, and will issue further prompts to find out anything it needs to complete the copy operation. Command syntax is DCL-ish in nature. In fact, it is VMS DCL-ish in nature: command keywords may be duplicated on the command line, with each recurrence of the keyword within its scope superseding previous occurrences of the keyword. This was done for ease of implimentation. An LBC command consists of an input specification an output specification (input first, and separated by a space from the output), and keywords defining how the copy is to be done. Keywords must be applied to the input or output specifications; they may not be applied at the beginning of the command (a variance from DCL). Both input and output specifications can be either a device or a file. If only a device name is specified, it must refer to a direct-access device, mounted foreign. If any other portion of a file name is specified, it is assumed to refer to a file on a direct-access device mounted FILES-11. The default input file specification is "SY:[]LBC.DAT;"; any elements of the file name that were not supplied will be defaulted to the corresponding elements of the default file specification. Any elements of the output specification name that are not supplied will be defaulted to the corresponding elements of the input file specification. LBC will NOT read or write ANSI magtape (or any other kind). Keywords are specified as: .BLANK;.INDENT 4 /name=value .BLANK or .BLANK;.INDENT 4 /name:value .BLANK Keywords are appended to the input and output specifications. They can be negated by prefixing "NO" to the keyword name (after the slash); the effect of this (if any) varies with the keyword. Local keywords qualify how the input or ouutput device or file is to be handled, and must be associated with the specification they qualify. Global keywords control the overall operation of LBC, and may be attached to either input or output specification. The keywords currently supported by LBC are: .LEFT MARGIN +8 .BLANK;.INDENT -8 /BUFFER is a global keyword that controls the buffer size used by LBC. It may be set from 1 to 64, and defaults to 64. Negating this keyword does not affect its function. .BLANK;.INDENT -8 /NUMBER is a global keyword that specifies the number of blocks to be copied. It is a positive number, and defaults to the maximum feasable value, as calculated from the size and starting locations on the input and output specifications. Negating this keyword does not affect its function. .BLANK;.INDENT -8 /PRESERVE is a global keyword that specifies the input file attributes should be preserved in the output file. This switch can be negated. It defaults to /PRESERVE if the whole input file is being copied to a new input file, and to /NOPRESERVE under all other circumstances. It is, in fact, illegal to assert it unless the whole input file is being copied to a new output file, which means it is illegal to assert it if doing I/O to a foreign disk. .BLANK;.INDENT -8 /START is a local keyword that specifies the starting location for the copy. It can be specified independantly for both input and output devices (or files). Legal values range from 0 to the device size for foreign disks, from 1 to the file size for input files, and from 1 to anything on output files (which may be extended). The default is 0 for foreign disks, and 1 for files. Negating this keyword does not affect its function. .LEFT MARGIN -8 If you are using LBC in interactive mode, you need enter only the information you have been prompted for, though you can enter an entire command. If you wish to enter both an input and output specification in response to the prompt for the input device or file, you may do so. If you don't, LBC will prompt you for the output device or file. LBC will honor any keywords that you explicitly specify on either input or output, and prompt you for anything you didn't specify. The actual copy operation is done as many blocks at a time as possible. If an error is encountered, the size of the I/O operation is cut in half, and the operation is retried. If the I/O operation still fails when only one block is being read or written, that block is skipped on both the input and output device or file, an error is reported to the user, and LBC proceeds to the next block. If an I/O operation succeeds, the size of the next I/O operation is doubled until it reaches the maximum allowed. If you wish to see a trace of LBC's actions, simply assign the logical name LBCTRACE to the device (and file name if appropriate), you want the output to be written to. A device name is required, as the file is opened by default on NL:. Alternatively, if LBC is installed, you can reassign LUN 4 to the device you want to use for the trace, and the output will go to file LBCTRACE.DAT in your default directory on that device. .APPENDIX Error messages .LEFT MARGIN 9 .AUTOPARAGRAPH LBC informational and error messages are issued in the form .BLANK;.INDENT +4 LBC -- severity -- Error message text .BLANK LBC always halts its current operation and returns to command level for "Error" and "Fatal" errors, but continues for "Information" messages and "Warning" errors. All the messages documented below represent "Error" conditions unless otherwise noted. When LBC exits, it returns to its parent task (if any) the most severe status encountered in the last copy operation. The following list of messages is alphabetical by error message text. .NOAUTOPARAGRAPH .LEFT MARGIN +8 .BLANK 2;.TEST PAGE 4;.INDENT -8 Can't copy past end of .BLANK The sum of the starting block and the number of blocks to be copied is greater than the total number of blocks on the device or in the file named in the error message. .BLANK 2;.TEST PAGE 4;.INDENT -8 Done .BLANK This is an informational message. LBC has completed the copy. .BLANK 2;.TEST PAGE 4;.INDENT -8 Failed to assign LUN to .BLANK LBC could not assign a logical unit to the device named in the message. Subsequent lines of the error message will tell why. .BLANK 2;.TEST PAGE 4;.INDENT -8 Failed to get LUN information on .BLANK LBC could not retrieve information on the device named in the message. Subsequent lines of the error message will tell why. .BLANK 2;.TEST PAGE 4;.INDENT -8 File extend error on .BLANK The copy operation required the file named in the error message to be extended, but the attempt to allocate the space failed. Subsequent lines of the error message will tell why. .BLANK 2;.TEST PAGE 4;.INDENT -8 File open error on .BLANK LBC could not open the file named in the error message. Subsequent lines of the error message will tell why. .BLANK 2;.TEST PAGE 4;.INDENT -8 Header read error on .BLANK LBC could not read the file header for the file named in the error message. Subsequent lines of the error message will tell why. .BLANK 2;.TEST PAGE 4;.INDENT -8 Header write error on .BLANK LBC was unable to update the file header of the file named in the error message.. Subsequent lines of the error message will tell why. .BLANK 2;.TEST PAGE 4;.INDENT -8 Internal error reparsing spec .BLANK LBC failed to apply the defaults to the device or file specification in the error message. Subsequent lines of the error message will tell why. This is most likely a bug in LBC. .BLANK 2;.TEST PAGE 4;.INDENT -8 Logical I/O not supported on .BLANK The device named in the error message is not a mass storage device, therefore LBC does not know how to do logical I/O on it. LBC expects U.CW1 to be equal to octal 140010 (ignoring the bits specified by octal 001700). .BLANK 2;.TEST PAGE 4;.INDENT -8 Must copy whole file to preserve attributes .BLANK You have specified that the input file attributes are to be preserved, but one or more of the following conditions was encountered: .LIST 'o' .LE;You specified a device rather than a file for input; .LE;You specified a device rather than a file for output; .LE;You did not specify that the whole file was to be copied; .LE;You attempted to copy the data into an existing file; .LE;You specified a starting block other than 1 for the output file. .END LIST .BLANK 2;.TEST PAGE 4;.INDENT -8 Operation failed on .BLANK A QIO directive error occurred while attempting to read or write the indicated device or file. This is most likely a severe pool problem or a bug in LBC. .BLANK 2;.TEST PAGE 4;.INDENT -8 Operation failed on block nnnnn .BLANK An I/O error was encountered while attempting to read or write the indicated block on the indicated device or file. Subsequent lines of the error message will indicate the source of the error. This message can be either an error or a warning, depending on the condition encountered. If the message is a warning message, LBC will continue to copy, but skip a block on both input and output. You will get one of these messages for every bad block in either the input or the output. .BLANK 2;.TEST PAGE 4;.INDENT -8 Size of is unknown to the system .BLANK The system cannot determine the size of the device given in the error message. This can occur for devices such as MSCP disks that are sized dynamically by the system, if the device has not been brought on line properly. .BLANK 2;.TEST PAGE 4;.INDENT -8 Start block on out of range .BLANK If the message contains a device specification, you have tried to start the copy at a negative logical block, or a logical block greater than or equal to the size of the device. If the device contains a file specification, you have tried to start the copy at virtual block 0 (or less), or at a virtual block greater than the size of the file. .BLANK 2;.TEST PAGE 4;.INDENT -8 Switch "/xxxxx" is illegal .BLANK LBC does not recognise the switch. .BLANK 2;.TEST PAGE 4;.INDENT -8 Unsupported file specification in .BLANK LBC does not support the file specification given. This will occur if you have included a node name in the file specification, or if you have specified an ANSI or other foreign (meaning non-FILES-11) file name. .APPENDIX Building LBC .LEFT MARGIN 9 .AUTOPARAGRAPH LBC is built using the command procedure LBC.CMD. The only questions deal with whether list and map files are to be generated and whether to retain the objects after the build. LBC must be compiled using FORTRAN-77. It is normally linked to the FCS OTS. There is no known reason why it couldn't be linked to RMS (though that won't buy you network operation). The default build procedure assumes FORTRAN-11 is installed as _...F77, and your Fortran 77 OTS library is LB:[1,1]F77OTS.OLB. By default, you are linked to no resident libraries. There is no reason why you couldn't link LBC to FCSFSL, or build it /ID, but there is probably nothing to gain. The default LBC is overlaid, with command input and parsing on one leg, copying on the second, and error interpretation and reporting on the third. Building /ID might allow it to be built flat, but there's probably not much throughput to be gained thereby. Linking to a Fortran resident library may actually cause problems, as it takes 8K off the task's address space, and the "copy" leg of the overlay is mostly buffer. .APPENDIX Revision history .LEFT MARGIN 9 The following releases of LBC exist: .LIST '*' .LE;88.126 - Original release. .LE;89.052 - Bug fix. Previous release forgot to subtract 1 from the disk size to come up with the highest logical block number. .END LIST