HP OpenVMS Systems Documentation

Content starts here

OpenVMS User's Manual

Previous Contents Index

6.16.2 Initializing the MIME Utility

When a user starts the MIME utility, the initialization process performs the following steps:

  1. In the user's VMSmail profile, the MIME utility looks up the user's mail directory and default editor for use with the MIME utility.
  2. The MIME utility reads files MIME$MAILCAP.DAT and MIME$FILETYPES.DAT.
  3. The MIME utility refers to the following list of internal defaults:
    • Content types
      The MIME utility refers to the list of content types before displaying incoming messages. The list contains content types that the MIME utility recognizes and the information needed to decode each content type into its original format.
      The following is an example of a MAILCAP entry, from RFC 1524:

      image/*; xview %s

      You can add content types to the list MIME recognizes by creating a MIME$MAILCAP.DAT file. (Example 6-1 contains an example of a MIME$MAILCAP.DAT file.)
    • File extensions
      The MIME utility refers to the list of file extensions while composing outgoing messages. The list contains OpenVMS file extensions and the content type associated with each extension. The MIME utility needs these extensions to be included in the MIME-formatted message body it composes.
      Each line in the file-extension list is made up of the following items:

      extension, content type/subtype, (optionally) Content-Transfer-Encoding string

      The following is an example of a line in a file-extension list:

      doc, application/ms-word, base64

      You can add file extensions and matching content types to the list the MIME utility recognizes by creating a MIME$FILETYPES.DAT file, which is described in Table 6-1.

6.16.3 Creating Optional MIME Utility Files

Table 6-1 lists and describes files you might want to create to customize the MIME utility on your system.

Table 6-1 MIME Utility Optional Files
File Purpose
MIME$MAILCAP.DAT For the display and parsing of incoming messages.
MIME$FILETYPES.DAT For the assignment of content types to outgoing attached files.

Place these files in the SYS$LOGIN directory. MIME$MAILCAP.DAT File Processing

The format of the MIME$MAILCAP file originated in RFC 1524, A User Agent Configuration Mechanism for Multimedia Mail Format Information, by N. Borenstein, September, 1993. The MIME utility uses instructions in this file to interpret and display messages and attachments. By following these instructions, the MIME user agent calls external programs to display the content types found in MIME messages.

You can customize the MIME$MAILCAP.DAT file to specify a File Descriptor Language (FDL) for a specific content type to extract message parts on your system. Example 6-1 contains an example of a MIME$MAILCAP.DAT file.


References to program names must be logical names or valid file specifications.

Example 6-1 MIME$MAILCAP.DAT File

# Local customizations of content types and processing options
# Use xv.exe to display images
image/*; xv %s
# Use Netscape for html attachments
text/html; netscape %s
# MIME$FILETYPES.DAT File Processing

The optional MIME$FILE_TYPES.DAT file contains lists of OpenVMS file extensions and the MIME content type associated with each one. ADD command processing uses the FILETYPE structure to designate the content type of an OpenVMS file to be attached to a composed message.

The syntax of the file format is similar to that of the MIME$MAILCAP.DAT file, with the "#" character indicating comments. Each line in the file contains a single file extension (without the leading '.'), followed by the content type and subtype to be associated with files that use that extension.

Optionally, the line can include the Content-Transfer-Encoding string (7bit, 8bit, Base64 or Quoted-printable), which is used to encode the contents of the file for transmission in the message. 7bit, 8bit, Base64 or Quoted-printable are the standard MIME encodings and the only ones accepted. If no encoding is specified, the MIME utility uses 7bit.

6.16.4 Extracting MIME-Encoded Files Using the MIME Utility

To extract a MIME-encoded file using the MIME utility, first, open the file you want to decode. You can open the file in one of two ways: by invoking the MIME utility specifying the file name or by opening the file in the MIME utility. EXTRACT extracts the specified attachment to a file in its native file format or in another format specified by the /FDL qualifier.

The following are typical MIME utility commands used to open a message file, display the message in readable text, and list the message attributes:

MIME> OPEN file-name

To extract the attachment, enter the following command:

MIME> EXTRACT /ATTACHMENT=n destination-file-name

You can specify a single attachment by appending the /ATTACHMENT=n qualifier, which specifies the number of the attachment to be extracted. You can also use /FDL=filename, which specifies a File Descriptor Language (FDL) definition file to use when converting the specified attachment into an output file. The numbers for the individual attachments are displayed with the LIST command.

See Section 6.16.6 for a complete list of commands used in the MIME utility.

6.16.5 Encoding Files Using the MIME utility

To encode files to be sent as attachments, you must first create a new file by invoking the MIME utility and specifying the NEW command. If the file name is not specified, NEW will prompt for a file name:

$ MIME NEW new-file-name

Or you can use the OPEN command in the MIME utility to open a draft message file:

MIME> OPEN/DRAFT file-name

To open a file that you created in a previous session, specify the qualifier /DRAFT in the command.

To add attachments to the file, enter the command:

MIME> ADD file-name

For a complete list of optional qualifiers for this command, see Section 6.16.6.

To write the current information to the file, use the SAVE command. Once saved, the MIME-encoded file can be sent as a file by the OpenVMS Mail utility.

To exit the MIME utility, enter the QUIT or EXIT command.

See Section 6.16.6 for a complete list of commands used in the MIME utility.

6.16.6 MIME Utility Commands

The following list contains descriptions of the commands, parameters, and qualifiers available in the MIME utility. Examples follow each description.

ADD --- Adds a new body part or attachment to the message being edited. The ADD command requires the name of the file you want to attach as a parameter. The optional qualifiers are:

  • /BINARY --- Sets content type to "application/octet-stream" and content-transfer-encoding to "base64". This format can be used to represent an arbitrary binary data stream.
  • /CONTENT_TYPE=type --- Overrides the default content type with a specified string, for example "IMAGE/JPEG."
  • /ENCODING_TYPE={7Bit|8Bit|Base64|Quoted-Printable} --- Overrides the default encoding with a specified encoding type.
  • /MESSAGE --- The attachment is a message file (standard RFC822).
  • /TEXT --- The attachment is content type text.

MIME> ADD file-name/TEXT

CLOSE --- Closes the current message file. If you have not saved your most recent changes, the MIME utility will prompt you to save before closing. If the file is /READ_ONLY, the file is left unchanged.


EDIT --- Invokes the user's default text editor for the specified attachment.

MIME> EDIT attachment-number

EXIT --- Exits the MIME editor, saving any work in process.


EXTRACT --- Extracts the specified attachment to a file in its native file format.

  • /ATTACHMENT=n --- Specifies the number of the attachment to be extracted.
  • /FDL=filename --- Specifies a File Descriptor Language (FDL) definition file to use when converting the specified attachment into an output file.


HELP --- Displays a help file for the MIME utility.


LIST --- Displays information about the current message including a list of body parts and attributes, such as the attachment number.


NEW --- Creates a new message.

MIME>  NEW file-name

OPEN --- Opens the message with the specified file name. The qualifiers available are:

  • /DRAFT --- The message file is a draft created in a previous session.
  • /READ --- The message is read-only and cannot be updated.

MIME> OPEN file-name/NEW

QUIT --- Aborts the current MIME editing session without saving the current message.


READ --- Displays the current message as readable text. Displays the attachment, if applicable.


REMOVE --- Deletes a specified attachment from the current message.


SHOW --- Displays information about the MIME environment, depending upon what option is specified. Possible options are CONTENT_TYPE, FILE_TYPES, and VERSION.

MIME> SHOW option

SAVE --- Writes the current message to a file. If a file name is specified, it will be used.

MIME> SAVE file-name

6.16.7 Error Handling

Error conditions are reported using the OpenVMS signaling subsystem, specifically lib$signal() and lib$stop(). Three levels of severity exist for error conditions: Fatal, Error, and Warning. These levels indicate what results you can expect from a condition. The severities and corresponding results are described in the following list:

  • Fatal (-F-) results in the immediate termination of the program.
  • Error (-E-) results in the termination of the currently active command while retaining the existing message context.
  • Warning (-W-) results in the completion of the current command, without interupting the MIME editing session. However, this does not mean that the command accomplished all its tasks successfully. Check the results for errors.

Chapter 7
Phone: Communicating with Other Users

The OpenVMS Phone utility (PHONE) is a communication program designed to allow users to "talk" to each other via their terminals, computers, or computer networks. This chapter includes information about:

  • Using Phone
  • Entering Phone commands
  • Customizing your Phone viewport
  • Summary of Phone commands

For additional information about the commands described in this chapter, refer to online help.

7.1 Using Phone

Phone (sometimes referred to as the Phone facility) provides features that are similar to actual telephone communications, such as the hold button, conference calls, and telephone directories. You can use Phone to communicate with other users on your system or with any other system connected to your system by DECnet for OpenVMS networks.

To invoke Phone, enter the PHONE command at the DCL prompt and press Return. You can specify the user name of the person with whom you want to communicate before or after you enter Phone. When you invoke the Phone utility, Phone takes control of your terminal and displays the Phone viewport.

The following figure shows the Phone viewport:

$ PHONE   (1)

                OpenVMS Phone Facility         11-DEC-1999

% (2)

                   TAURUS::SMITH  (3)

                  GEMINI::PETERS  (4)


The fields on the viewport are as follows:

  1. The command that is used to enter the Phone utility.
  2. The Phone prompt, also known as the switchhook. This is where you enter Phone commands. You can get to the Phone command line by pressing the switchhook (%) character at any time during your conversation. The switchhook character is the percent sign (%) on your keyboard.
  3. The top part of the viewport is where the conversation text that you type appears.
  4. The lower part of the viewport is where the conversation text that other participants type appears. You can have up to six participants in a phone conversation.

The viewport contains information regarding the user's name, the text of the conversation, and various status indicators, such as who is on hold. User names of people that you have on hold can be temporarily eliminated from the screen to make room for new participants.

7.1.1 Help on Phone

You can obtain information about Phone by invoking the HELP command at the DCL prompt as follows:

Topic? PHONE
You can also enter Help from within the Phone utility by entering the HELP command at the switchhook (%) prompt.

7.2 Entering Phone Commands

To enter Phone commands, you must first press the switchhook character (%). If you are using the Phone utility but are not currently engaged in a conversation, the switchhook character is optional because there is no ambiguity between a command and conversation.

You can press Ctrl/W at any time during your current conversation to refresh the screen.

The DIAL, DIRECTORY, MAIL, and PHONE commands accept logical names. To prevent Phone from treating a parameter to these commands as a logical name, prefix the parameter with an underscore.

When you are engaged in a conversation, most of the characters that you type are considered part of that conversation and are sent to each participant. The exception is the percent sign (%), which signals that you want to enter a Phone utility command. You can enter any Phone utility command during a conversation. See Section 7.4 for a list of available Phone commands.

7.3 Customizing Your Phone Viewport

When entering the DCL command PHONE, you can supply the following qualifiers that modify the characteristics of the simulated telephone:

/SCROLL Determines how new lines of text are displayed on the screen when the viewport becomes full.
/SWITCH_HOOK Specifies the character to be used for the switchhook prompt. The switchhook character must be entered before each Phone utility command that is entered during a conversation.
/VIEWPORT_SIZE Specifies the maximum number of lines in a viewport, including the heading line and the bottom line of dashes.

For complete descriptions of Phone qualifiers, enter HELP PHONE at the DCL prompt.

7.4 Summary of Phone Commands

The following table summarizes all of the Phone commands available. There are no qualifiers associated with the commands in this table.

Command Description
ANSWER Answers the phone when you receive a call.
DIAL Places a call to another user.
DIRECTORY Displays a list of those users with whom you can talk on your system or on any other system in the network.
EXIT Exits from the Phone utility.
FACSIMILE Allows you to include the contents of a file in your conversation.
HANGUP Hangs up your phone. This disconnects all current links---the current conversation, anyone you have on hold, and anyone who has you on hold.
HELP Enables you to obtain online information about the Phone utility.
HOLD Enables you to put on hold other users who are currently participating in a conversation with you.
MAIL Allows you to send a brief message to another person.
PHONE Is synonymous with the DIAL command.
REJECT Allows you to reject a call from another user while you are using Phone.
UNHOLD Reverses the most recently entered HOLD command.

For complete descriptions of Phone commands, invoke Phone and enter the HELP command.

Previous Next Contents Index