PMDF User's Guide
UNIX Edition


Previous Contents Index


MODE

Set the file reading mode.

Syntax

MODE mode


Parameters

mode

Required parameter specifying the file reading mode in which files are to be accessed. There are two supported modes: TEXT and BLOCK.

Description

Files can be read (accessed) in a variety of ways. The MODE command controls the method used to read the files the mail server returns. Note that default modes apply automatically to various sorts of files; this command provides a way to override these defaults.

The possible values for mode are:
TEXT Read files as ordinary text files. In TEXT mode, files are read as a sequence of records and sent as ordinary text. TEXT mode is the default for files when no other mode has been set.
BLOCK Read files as raw binary data. Any record boundary information, including carriage returns, line feeds, line length counts, and indexing information for indexed files simply becomes part of the data. The resulting data typically can only be used on the computer system it is intended for. (Note that this is not necessarily restricted to UNIX; it is possible to store files intended for other systems as UNIX files.) This is the recommend mode to use for binary files.

The reading mode specified with the MODE command applies to all subsequent SEND commands in the same message. It may be overridden with a subsequent MODE command, or, on a per command basis, with the SEND command's /MODE qualifier. And, of course, reading modes established in previous messages sent to the server have no effect on subsequent messages which you might send.

See the SEND command description for further information on the usage of this command.


Examples

The commands,


MODE BLOCK 
ENCODING BASE64 
SEND gif/boats*.gif 
SEND/MODE=TEXT gif/index.txt 
set the default reading mode to BLOCK and the default file encoding to BASE64. Any files matching the specification gif/boats*.gif will be sent using these defaults. However, the file gif/index.txt will be sent as an ordinary text file owing to the use of the /MODE=TEXT qualifier.


Error Messages


%MAILSERV-W-IVKEYW, unrecognized keyword - check validity and spelling 
      

You specified an unknown mode. Resend the command specifying a legal value for the mode parameter.


%MAILSERV-W-INSFPRM, missing command parameters 
      

You failed to specify the mode parameter. Resend the command specifying a legal value for the mode parameter.


Previous Next Contents Index