TAPECHK copyright (C) 1986,2002 by Allegro Consultants, Inc. TAPECHK is a program that tests tapes (or, depending on your viewpoint, tape drives). We wrote it one day when we were having hardware problems with a new tape drive...the ONLY program that ran on it without an error was the contributed TAPETEST program...everything else failed (e.g.: FCOPY, STORE). Since we did not have access to the source for TAPETEST, we make no claims that TAPECHK does a complete superset of the tests done by TAPETEST, but we have found it to be effective in checking tapes and tape drives. TAPECHK is an interactive program. When it prompts you, enter one of the following commands. Only the uppercase characters of a command name need to be entered. Parameters shown in brackets ([]) are optional. A pound sign (#) is used to indicate that the parameter is an integer. ANALYZE [#eofs] [EOT #eofs] [SHORTS #] Reads tape (entire tape, or up to # EOFs), reporting the record sizes seen. BACkspace [#] Backspaces the tape # records (# defaults to 1). A control-Y will exit back to the TAPECHK command prompt. BEEp [#] Defines an error "alert" number, #, which TAPECHK will compare against the actual file system I/O error when one occurs. If the 'alert' number occurs, a beep will be sent to the terminal along with the error message. This is useful if you want to run TAPECHK from a CRT terminal and want to "hear" when a particular error occurs. Example: BEEP 26 will beep whenever a transmission error occurs. CLOse Closes the tape. This lets you test different tape drives. DATA <# | INTEGERS | RANDOM | TEXT | TIME | UNKnown> DATA INtegers will cause the WRITE command to write records consisting of ascending integers. (This is the default) DATA # will cause WRITE to write records consisting only of the numeric value #. Negative numbers are allowed. DATA with no parameters will report the current setting. RANDOM TEXT TIME UNKNOWN is generally used for tapes where TAPECHK didn't write the data to them. Many hardware CEs like to see a pattern of all ones being written to the tape...you can do this by saying: DATA -1 DISPLAY [#] Displays last buffer read (optionally limited to specified number of bytes). EXIt or E Terminates the TAPECHK program. FCONTROL control# [param#] Called fcontrol (tape, control#, param#); FILLtape [recbytes#] [PERIODICEOF #] [RANDOMEOF #] Writes records of size bytes_per_record until an EOT is hit. If the EOF option is specified, an EOF is written every 1000 records. FINDEOF Reads tape until EOF is encountered FINDEOT Reads tape until EOT is encountered HELp or ? Prints this help information. NOSHOWDATA Tells the READ command not to display the data read from tape. OPEN [ #] [BUFfers #] [DEQ] [DEVice <# | name>] [noRETry] [noWait] [< IN | INOUT | IO | OUT>] [RECsize <# | MAXimum> ] FOPENs a tape to test. The formal name is: TAPE Note: if a file equate for TAPE exists, it will override the DEV= and REC= options, unless the DEQ option is specified. Note: you don't have to issue this command...any command that talks to the tape (READ, WRITE, TEST, and REWIND) will do an implicit OPEN command if needed. The default is INOUT, BUF=0, DEV=TAPE, REC=12000. By default, the tape is opeend and fsetmode is called to report recovered errors, but not wait for physical I/O to complete. This can be overridden with the following options to OPEN: NOWAIT don't wait for physical I/O to complete. NORETRY don't ask MPE to report recovered write errors. RETRY ask MPE to report recovered write errors. WAIT wait for tape drive to complete the physical I/O before returning status. Note: this option can dramatically slow the performance of TAPECHK on tape cartridges and streaming tape drives. PFI (synonym for PRINTFILEINFO) Called printfileinfo (tape_file_#) PRINTFILEINFO Called printfileinfo (tape_file_#) READ REAd [#] [NOcheck] [IGNoreeof] Reads # records, of the currently specified size, from the tape. Each record is checked to see if the data read matches what would have been written by a TAPECHK WRITE command. If a record is shorter, or longer, than expected an error will be reported. If # is not specified, 1 will be assumed. A control-Y will exit back to the TAPECHK command prompt. READ is intended to read data from the tape that has been written by an earlier WRITE command by this program. However, if you simply want to see if data can be read from the tape, use READ with the NOCHECK option. This will cause TAPECHK to read the tape, but not check the data read against what it expected to find. In this mode TAPECHK will print a dot (.) every 50 records read. Similarly, the IGNoreeof option will cause the READ command to issue another read whenever it hits an EOF. A ">" is also printed if NOCHECK is true and an EOF is found. If you mount a CM STORE tape and issue READ NOCHECK commands, you might see something like the following: read 20 no EOF on tape at record # 1 read 20 no EOF on tape at record # 2 !note: STORE tapes start with 2 EOFs read 20 no 40 !first record on tape is 40 word label !(40 words = 80 bytes) EOF on tape at record # 4 read 20 no 120 !next record, after eof, is directory EOF on tape at record # 6 read 20 no !next comes the first data file... 4096 4096 4096 4096 4096 4096 4096 4096 4096 2048 EOF on tape at record 17 RECSIZE # Sets the current tape "record size" to # words. (A "word" is 2 bytes here.) The maximum allowed record size is 16383 words. If # is not specified, then the current value of RECSIZE is reported. The initial value is 8192 words (16384 bytes). Note: the CM version of TAPECHK has a maximum record size of 12000 words (24000 bytes). REWind Rewinds the tape. RESET [options] SET [options] options::= PAGING | ZEROcheck SHOWDATA Causes the READ command to display the data in hex and printable ASCII. SIZE # See: RECSIZE (synonym) SKIPEof [#] Causes TAPECHK to skip the tape forward # eofs. If # is not specified, then it defaults to 1. If an error is detected during any of the skips it is reported and the rest of the skips are, ahem, skipped. TESt TESt [#loops [#records] ] Rewinds the tape, then does: Loop #loops times, doing a test consisting of: rewind; do #records writes rewind; do #records reads A control-Y will exit back to the TAPECHK command prompt. #loops defaults to 1, #records defaults to 32767. If an end-of-tape marker is encountered, it will be reported, the tape will be rewound, and the testing will continue as though #records had been reached. To do a very quick "can I read/write to this tape" test, use: TEST 1 1 TRAce [frequency#] If frequency# is greater than 0, then READ, WRITE, BACKSPACE, and TEST will print a '.' every frequency# records. This provides a way of telling how far the tape test has progressed. A value of 0 disables tracing. If no number is specified, the current value will be reported. VARiable [ + or - ] Sets the "variable" record size option to true or false. When VARIABLE is true, the size of each record writting by the WRITE command varies according to the following expression: actual'recordsize := recordnumber mod recordsize; (Where recordsize was specified by the SIZE command, and recordnumber starts at 1 when the tape is rewound.) VARIABLE writes are useful because they test the tape drive performance over a wide range of record sizes. The default setting is off (-). WRITE WRIte [#writes] [PERIODICEOF #] [RANDOMEOF #] Writes #writes records to the tape. (If #writes is not specified, it defaults to 1.) The current recordsize is used. currently specified recordsize. If you have not used the DATA command, each record is an array of recordsize words, containing the integers: 1, 2, ..., recordsize. A control-Y will return TAPECHK to the command prompt. WRITEIGNORE WRITEIGNORE [#writes] [PERIODICEOF #] [RANDOMEOF #] Like WRITE, but ignores tape errors. -- Some commands have an optional parameter rather slackly parsed called "": ::= #1 [EOF #] [IGNoreeof] [NOcheck] [RANDomeof #] PERIODICEOF # ... write an EOF every # records RANDOMEOF # ... write an EOF approximately once per # records. // TAPECHK version 20140822, by Stan Sieler (sieler@allegrosupport.com)