Examining the Contents of a Tape or Floppy Disk

The T-READ command reads a tape record and displays its contents on the screen or sends it to the printer. It does not restore the data or format it. It is somewhat the equivalent of the DUMP command, which dumps a specified frame on the screen. T-READ dumps one or more blocks from tape, and you can use it to examine the tape to locate a specific file.

Format

T-READ [n-m] [(options)]

Parameter(s)

n

Number of tape records to read and display relative to the current record. If you do not specify n, all records up to the next EOF are displayed. n-m specifies a range of records.

options

May be one or more of the following:

A

Converts from EBCDIC to ASCII, then displays alphanumeric segments.

P

Sends the display to the printer.

S

Prevents the tape cartridge from rewinding to a tape label. This option can be used only on a 1/4-inch tape drive.

X

Displays tape contents in hexadecimal format as well as in character format.

On 1/4-inch tape drives, T-READ expects the tape to be positioned at a tape label. If this is not the case, T-READ rewinds the tape to BOT and tries again.

>T-READ (1

BLOCK SIZE:  512

L 0200 16:34:10  06 APR 1993 DICT MD              ~01

RECORD = 1

 

 1 BLOCK-CONVERT^Q^BLOCK-CONVERT^^^^^^^L^10^[T-LOAD^P

 51 T^35^73^[RTD^P^20A0^[DATA^CZ^[DTR^P^10A0^[LISTPEQS

101 ^P^AB^[TAPETEST^PQ^SS^IT^IF A # DALE'S ORDERS GO

151 100^HTIME^P^D0^X^100 ONOT THE RIGHT TAPE^P^[IT^PQ^

201 IT^D0^HTIME^P^[X-ON^P^510E^[T3^PQ^T (-5),"TWINKLE"

251 ,(-6)^[B^PQ^HSORT ORDERS BY-EXP^S2^A^HBREAK-ON^B^D

301 0^A^HTOTAL AMOUNT^P^[HEADING^CL^[BLOCK-PRINT^P^500

351 A^41^[SS^PQ^SS^HLIST CUSTOMERS^A2^D0^P^[*A10^A^10^

401 ^^^^^^L^10^[LOCALSUB^PQ^HSORT CUSTOMERS BY^A2^HLNA

451 ME FNAME^ODOUBLE SPACE?+^IP^S3^IF A = Y [] 20^P^X^

501 20 H DBL-SPC

>

In the following example, the T-FWD command is used to advance four physical tape records. T-READ, entered with S option, displays the block at that position.

>T-FWD (4)

BLOCK SIZE:  512

>T-READ (1S)

BLOCK SIZE:  512

RECORD = 1

 

 1  REPORT+^IP?^IF A = YES GO 500^IF A # YES X REPORT

 51  NOT GENERATED^500 HSORT CUSTOMERS BY LNAME^H LNAM

101 E_[ FNAME^P^[TESTIP2^PQ^ODO IT+^IP?^IF A = N GO 99

151 9^HSORT CUSTOMERS^P^999 X I WON'T THEN^[CUST-FIND^

201 P^E6^^^BP^[DEBUG-OFF^P^1243^[FXSUB^P^E6^^^BASICLIB

251 ^[D^P^242^[SIZE^A^9999^^^^^^MR0^R^10^[C-O^PQ^H.R M

301 D CUST.ORDER.LIST^P^[LBP^Q^LMUI^BP^^^^^^L^10^[V/CO

351 NV^A^07^CONVERSIONS^^^^^^L^30^1^[LIST-LABEL^PA^35^

401 4D^7D^[BUILD-LOCK-XREF^P^E6^^^BASICLIB^[L/UPD^A^06

451 ^^^^^^^L^5^[ADDD^PA^40A0^[LISTPTR^P^AE^[SORT-ITEM^

501 PA^35^4E^508

This block is somewhere in the middle of a file. No label is displayed. Without the S option, the tape would have been rewound to the beginning and the output would be the same as in the previous example.

See Also

Using mvBase Tape Units