% VAX-11 Librarian V04-00 q q5TAPCTRL q 1 TAPCTRL? A program to manipulate the structure of data on tape devices.2 To run this program you must declare two symbols: INTAPE :== 'INPUT_DEVICE' OUTAPE :== 'OUTPUT_DEVICE'> Where the 'INPUT_DEVICE' is the device name of the tape drive< to be used for input to other devices. This device must be defined for the program to run.? Where the 'OUTPUT_DEVICE' is the device name of the tape drive= to receive data from the 'INPUT_DEVICE'. This symbol may b e< defined either as a device or the command EXIT. If defined< as the command EXIT, you will only be able to view the data on the 'INPUT_DEVICE'.; Both the 'INPUT_DEVICE' and optionally the 'OUTPUT_DEVICE'= must be mounted on the system /FOREIGN. The 'OUTPUT_DEVICE' should have write-ring if used.? A command file TAPCTRL.COM is provided with this distribution.2 General_CommandsA These commands apply to both the input and output command modes. 3 CLEAR> Clears and re -paints the screen of the current command level. 3 REWND = This command rewinds the current command level device to the beginning of the tape. 3 SKIPF ? This command skips the number of files requested. The program7 will prompt for a number. Negative numbers are valid. 3 SKIPR A This command skips the number of records requested. The program7 will prompt for a number. Negative numbers are valid. 3 READ 8 This command reads the current record into  the Bufffer.7 It will display the first 80 characters of the Buffer.7 It also displays the first four bytes of the Buffer as: a REAL*4 number. Both items are displayed at the bottom  of a VT100 screen. 3 LOADF 8 This command copies the current Tape location till EOF.6 The data is stored in a VAX disk file you have named.7 This section of the program TAPCTRL is the same as the program LOAD. 3 FEOF + Finds next EOF mark on the current device.9 WARNING, if no EO F is present between the start position7 and the End-of-tape, the tape could run off the end of9 the reel. This depends upon the presence of a EOT mark.2 IN7 This sets the default device to the device declared as2 the input device at the beginning of the program.7 These command are in addition to the General commands,5 and assume that you have mounted an 'OUTPUT_DEVICE'. 3 WRITE < This command writes the information currently in the Buffer> to the output device. The  READ Command should be used prior  to using this command. 3 COPYR = This Command Copies the number of records specified from the> input device to the output device. The copy operation starts; at the current location on the 'INPUT_DEVICE' and copy the? number of records requested or till an EOF condition is found. 3 COPYF = This command Same as LOADF, except the data image is written< to the designated output device. The copy operation starts; at the current location on the 'INPUT_DEVICE' and copy the? number of records requested or till an EOF condition is found. 3 WEOF 7 Writes EOF mark to current location of current device.7 WARNING, This may not be valid for writing to a device! declared as being EBCDIC format. 3 LABEL 2 Allows for correction of LABEL on current device.3 WARNING, This is not valid for writing to a device! declared as being EBCDIC format.- Procedure: (Recovery of data from bad tape)1 1. Create a scratch tape with a correct label.2 2. Use this scratch tape as your output device. 3. Set command level to OUT. 4. Invoke LABEL command.0 5. Use copy commands to move files from input to output device.( Alternate: (To just change label name)! 1. Mount tape as input device. 2. Set command level to IN. 3. Invoke LABEL command.2 OUT7 This sets the default device to the device declared as3 the output device at the beginning of the program. 2 EXIT 8 This Command causes the program to exit to the previous7 command level. When in the command level for defining5 the device to access, this comman causes the program9 to stop. In stopping the program, both tape devices are1 reset to the beginning of tape, and deallocated. 2 ASCII ; This option sets a switch which tells the program that the< data should be considered to have ASCII format. The device= will default to the input device unless otherwise specified. 2 EBCDI ; This option sets a switch which tells the program that the= data should be considered to have EBCDIC format. The device= will default to the input device unless otherwise specified.ww