Table of contents Previous: READ Next: REPEAT

REDIRECT

Writes the LW file path redirection memory block.


Formats

REDIRECT ADD file "path
REDIRECT CLEAR type
REDIRECT DELETE file
REDIRECT LIST type
REDIRECT MAKE
REDIRECT REST
rfile
REDIRECT SAVE rfile


Parameters

ADD

adds a redirection entry to the file LWPATH.NAM and dynamic memory

CLEAR

clears the redirection entries

DELETE

deletes a redirection entry from dynamic memory and the file LWPATH.NAM

LIST

lists the file redirection entries

MAKE

writes the redirection entries from LWPATH.NAM into dynamic memory (default)

REST

restores a saved redirection file into file LWPATH.NAM and dynamic memory

SAVE

saves the redirection entries to a file

file

file name, e.g., MDXX3074, AREA011* ; 12 characters maximum including the extension; if you include an extension, it must be three or less characters (use a wildcard to match extensions longer than three characters)

"path

desired directory path, 59 characters maximum; the double quote is mandatory

type

FILE

the file LWPATH.NAM

 

MEM

dynamic memory (default for the LIST option)

 

ALL

both LWPATH.NAM and dynamic memory; use with the CLEAR option only (default for CLEAR)

rfile

redirection file name; if an extension is not specified, .NAM is automatically appended


Remarks

File redirection is used to define which directories McIDAS commands search when looking for specified data and help files. When a command requests data from a file (for example, when IMGLIST displays image data from the file AREA0001), the active redirect table is checked to see if one of its entries has a matching file name. If so, the command searches for the file in the directory specified in the entry.

The active redirect table resides in memory. You can create multiple redirect files, which can be individually restored to the active redirect table. Redirect files are created with a text editor or with the command REDIRECT ADD. Redirect files consist of one or more entries, each containing a file name and a directory or path. The entry's file name can contain wild card characters (for example, A*, AREA*, MDXX05*, *.GIF). Lines beginning with a double quote (") are comments (for example, "This is a comment). Comments can only be added with a text editor; not with REDIRECT ADD. Redirect files cannot contain blank lines.

The maximum length of an entry is 72 characters, 12 for the file name and 60 for the directory. The 60th character can only be a slash (/).

If your workstation is hung and you suspect file redirection is causing it, first exit McIDAS, then delete the file LWPATH.NAM and boot the system. This file is located in the $HOME/mcidas/data or another MCPATH directory.

Caution!
It is safest to redirect only data files, for example, areas and MD files. Do not redirect the source file specified with the DOSTOLW command or the destination file specified with the LWTODOS command. Redirecting McIDAS system files may cause problems.
Some of the systems files you should NOT redirect are listed below.
ALLOC.WWW FRNVEXP.nnn STRTABLE
CONTEXT.SLT LWPATH.NAM SYSIMAGE.PM
EXPORT.nnn MCRGB.TXT TERMCHAR.nnn
FRAMED.nnn MENU UCTERM.nnn
FRAMENH.nnn NUM.FRM VERSION.TXT
FRNV.nnn SKEDFILE WINQUFIL
FRNVDIR.001 STARTUP.SYS  

Examples

REDIRECT

This entry places the redirected files and paths from the active redirection file (LWPATH.NAM) into dynamic memory.

REDIRECT LIST FILE

This entry lists the redirection entries in the file LWPATH.NAM.

REDIRECT CLEAR

This entry clears the file LWPATH.NAM and dynamic memory.

REDIRECT ADD AREA137* "/u/smith/volume/mcidas/AREAS

This example adds the redirection path /u/smith/volume/mcidas/AREAS/AREA137* to dynamic memory and the file LWPATH.NAM.

REDIRECT REST TSTVL1

This entry brings the file TSTVL1.NAM into dynamic memory and the redirection file LWPATH.NAM.

REDIRECT ADD AREA* "/u/johndoe/mcidas/areas

REDIRECT ADD GRID8* "/u/johndoe/mcidas/gridfiles

REDIRECT ADD MDXX1000 "/u/johndoe/mcidas/mdfiles

REDIRECT ADD *.ET "/u/johndoe/mcidas/enhancements

REDIRECT SAVE DATA.NAM

REDIRECT REST DATA.NAM

These entries create redirect entries in the active redirect table and then saves the table as the file DATA.NAM. The last entry makes the file the active redirect table so it can be used.

To create the same DATA.NAM redirect file using a text editor, enter the lines below in DATA.NAM and save the file.

AREA*  /u/johndoe/mcidas/areas
GRID8*  /u/johndoe/mcidas/gridfiles
MDXX1000  /u/johndoe/mcidas/mdfiles
*.ET  /u/johndoe/mcidas/enhancements

To use the file once it has been created, restore it to the active redirect table by running the command REDIRECT REST DATA.NAM.


Table of contents Previous: READ Next: REPEAT