MAGRD -- Read PCIDSK/Text Files from Tape

Reads PCIDSK image database files (image and segment data) and/or text files (EASI procedures, image reports, etc.) from PCI interchange format tapes created by the MAGWR program. Tapes created by MAGWR can be used to send files to other EASI/PACE installations, or for archiving on systems with limited backup capabilities.

See Also: MAGWR, MAGREP

PARAMETERS

MAGRD is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILO     Output File Name                        0-64      Char
STARTFIL Start File on Tape                      0-1       Int

FILO

Specifies the name of the file to receive output from tape. FILO will be created automatically. Please specify a filename.

 EASI> FILO = "filespec"
Image files are always named in lower case, whereas text files are always named in upper case. This accommodates the case sensitivity of UNIX.

STARTFIL

Specifies the start file number on tape from which to start reading header and image data. If STARTFIL is greater than one, the program rewinds the tape and advances to the specified file. STARTFIL must be set to the file number required by MAGREP program to print tape header report.

 EASI>STARTFIL=1              | read first file on tape
 EASI>STARTFIL=n              | read nth file on tape

DETAILS

MAGRD is used to read files from PCI interchange format tapes, which were written to a tape by PACE Tape I/O program MAGWR. The files may be PCIDSK image database files (image and segment data) or text files (EASI procedure, image report, etc.). Unlike programs MIH and IMH, PCIDSK files are always transferred in their entirety to and from the database. A report on all files on the tape can be listed using MAGREP program.

The parameters FILO and STARTFIL interact in various ways to provide flexibility in reading.

If FILO = "filespec" and STARTFIL = n, the nth file on tape is written to a disk file called "filespec". This file is automatically created on disk.

If FILO = "" and STARTFIL = n, the nth file on tape is written to a disk file whose name is stored in the file header on tape. This file is automatically created on disk.

If FILO = "" and STARTFIL = (unspecified), then all files stored on tape are transferred to disk. Each file is named using the name held in the header for each file.

FILO = "filespec" and STARTFIL = (unspecified) is not a valid combination of values, and the program exits with an error.

Image files are always named in lower case, whereas text files are always named in upper case. This accommodates the case sensitivity of UNIX.

Files can span tapes. MAGRD will prompt the user to mount the next tape.

 A TAPE MUST BE MOUNTED ON THE TAPE DRIVE BEFORE MAGRD CAN BE RUN.
 CLEANING THE TAPE HEAD IS RECOMMENDED TO MINIMIZE THE CHANCE OF
 TAPE READ ERRORS.

EXAMPLE

Suppose a tape has three file on it. The first file is a text file named README.TXT. The second file on tape is a PCIDSK image database called LANDSAT.PIX. The third on tape is a text file called DEMO.EAS.

Read the 1st file from tape to a file called READ.TXT:

 EASI>FILO = "READ.TXT"
 EASI>STARTFIL = 1      
 EASI>RUN MAGRD
Read the 2nd file from tape to a file, using the name LANDSAT.PIX stored on the tape:

 EASI>FILO = ""
 EASI>STARTFIL = 2      
 EASI>RUN MAGRD
Read all three files off tape, naming each one using the file name stored on the tape:

 EASI>FILO = ""
 EASI>STARTFIL = 0      
 EASI>RUN MAGRD
This is an error:

 EASI>FILO = "DEMO.EAS"
 EASI>STARTFIL = 0      
 EASI>RUN MAGRD

About PCI Help Gateway