PMDF User's Guide
OpenVMS Edition


Previous Contents Index

1.1.8 Sending and Receiving Binary Files

PMDF MAIL's SEND command can be used to send binary files, or any sort of OpenVMS file (e.g., executables, spread sheets, word processing documents, images, databases, indexed files, etc.). The commands


$ PMDF MAIL
EMAIL> SEND file-spec
will send the file file-spec as an e-mail message.5 The file will automatically be encoded into a format suitable for transmission via e-mail.

For example, try sending an executable program to yourself:


$ PMDF MAIL
EMAIL> SEND SYS$SYSTEM:ERF.EXE
To: your-address
Subject: Test
EMAIL> 

Upon reception of such a message, PMDF will automatically decode the message and deliver it to you. Generally, the resulting message cannot be read directly, but must instead be extracted to a file with the EXTRACT command.

Continuing with the previous example, here's how to extract the received message:


EMAIL> DIRECTORY/NEW
    # From                 Date         Subject 
 
    1 BOB@EXAMPLE.COM         16-AUG-2012  Test  (1)
    2 BOB@EXAMPLE.COM         16-AUG-2012  Test 
 
EMAIL> READ 1
 
From: BOB@EXAMPLE.COM 
To: BOB@EXAMPLE.COM 
Subject: Test 
 
%EMAIL-E-FORMSG, you cannot read this foreign format message  (2)
        Use the EXTRACT command to copy the message to an external file 
 
EMAIL> EXTRACT ERF.EXE  (3)
%EMAIL-I-CREATED, D1:[BOB]ERF.EXE;1 created 
EMAIL> EXIT
$ CHECKSUM/IMAGE ERF.EXE (4)
file D1:[BOB]ERF.EXE;1 
image section %D'2' checksum is %X'1658A905' 
image section %D'3' checksum is %X'26021672' 
image header checksum is %X'3BBE84B7' 
checksum of all image sections is %X'305ABF77' 
$ CHECKSUM/IMAGE SYS$SYSTEM:ERF.EXE
file SYS$COMMON:[SYSEXE]ERF.EXE;1 
image section %D'2' checksum is %X'1658A905' 
image section %D'3' checksum is %X'26021672' 
image header checksum is %X'3BBE84B7' 
checksum of all image sections is %X'305ABF77' 
$ ANALYZE/IMAGE/OUTPUT=NLA0: D1:[BOB]ERF.EXE  (5)
%ANALYZE-I-ERRORS, D1:[BOB]ERF.EXE;1   0 errors 
$ 
 
The following items of note are identified with callouts in the above example:

  1. Typically, PMDF delivers foreign messages as two distinct mail messages. The first mail message is the actual file, in VMS MAIL's foreign message format. The second mail message contains the RFC 822 header associated with the original, encoded message.
  2. This error message is the error message which VMS MAIL will generate when you attempt to read a foreign format mail message. You can instead see an error message such as


    %EMAIL-W-UNAPLTYPE, unknown application subtype 
    
    If you get such a message, just proceed as described below and extract the message with the EXTRACT command.

  3. Extract the message to a file with the EXTRACT command.
  4. To check that the extracted file has not been corrupted, use the OpenVMS CHECKSUM utility to compare the checksum of the extracted file with the original file.
  5. Typically, you will not be able to compare checksums since you will be lacking the original file. However, in the case of executable programs, you can use the OpenVMS ANALYZE/IMAGE utility to verify the soundness of the file. If ANALYZE/IMAGE reports no errors, then the file has probably not been corrupted.

You can even include a note with files you send this way by using the /INSERT qualifier with PMDF MAIL's SEND command.

Note

5 From VMS MAIL, use the SEND/FOREIGN command.


Previous Next Contents Index