.help mtexamine Apr84 dataio
.ih
NAME
mtexamine -- examine the structure of magtape or a single disk file
.ih
USAGE
mtexamine tape_file
.ih
PARAMETERS
.ls tape_file
Tape or disk file, e.g. "mta1600[2]", "mta1600" or "data".
.le
.ls file_list = "1-999"
List of tape file numbers or ranges delimited by commas, e.g. "1-3,5-8".
File_list is used only if no file number is given in tape_file.
Files will be read in ascending order, regardless of the order of the list.
Reading will terminate if EOT is reached, thus a list such as "1-999"
may be used to read all the files on the tape. File_list is ignored is input
is a single disk file.
.le
.ls dump_records = no
Dump selected records?
.le
.ls rec_list = "1-999"
List of tape record numbers or ranges to be dumped delimited by whitespace
or commas e.g "1-3,4".
.le
.ls swapbytes = no
Swap bytes?
.le
.ls byte_chunk = 1
The number of bytes which are considered as one output element.
The maximum number of bytes permitted in byte_chunk is the number of
bytes in a long integer on the host machine.
.le
.ls output_format = "o"
Permitted types are character(c), octal(o), hexadecimal (x), decimal (d)
or unsigned decimal (u).  Character dumps are only permitted for byte_chunk = 1.
Unless decimal format is specified, the data are dumped as
unsigned integers.
.le
.ih
DESCRIPTION
By default mtexamine determines the record structure of all files
on a magnetic tape or a single disk file.
Selected files can be dumped by setting the file_list parameter.
Selected records can be dumped by setting the dump_record switch
and entering a record list. The user can select the byte chunk
and the output format for the dump.

Mtexamine can also be used to dump a single disk file. However the concept
of a block is not well defined for disk files. Mtexamine defines a block
to be one IRAF file io block which is usually some multiple of the machine
block size.
.ih
EXAMPLES
1. Determine the record structure of a magnetic tape and send the result to
the file tapedump.

.nf
	cl> mtexamine mtb1600 > tapedump
.fi

2. Dump the third tape file in octal bytes on the standard output.

.nf
	cl> mtexamine mtb1600[3] du+
.fi

3. Dump the contents of the fifth record of the third tape file in ASCII
characters on the standard output.

.nf
	cl> mtexamine mtb1600[3] du+ re=5 ou=c
.fi
.ih
BUGS
The IRAF magtape i/o routines do not permit data beyond a double EOF
to be accessed. Therefore mtexamine cannot be used to examine tapes with
embedded double EOFs.
.ih
SEE ALSO
rewind, allocate
.endhelp
