HP OpenVMS Systems

ask the wizard
Content starts here

DCL and Mailboxes?

» close window

The Question is:

I am trying to use an MBA mailbox device as a temporary, record orientated file.
Is this possible?
How can I create the mailbox, so that I can read and write to it and how do I
 then read and write to it ($OPEN /$ READ/ $ WRITE)?
Please bear in mind this all needs to be done using DCL, as I do not have
 access to a programming language.
Many thanks, Rob.

The Answer is :

  You will likely want to use a file as a temporary record-oriented file.
  Alternatively, you may be able to resolve the (unspecified) programming
  problem using the available DCL command PIPE available in V7.1 and later.
  Mailboxes can be opened, and synchronously written and read from DCL.
  For example:
    $ OPEN/READ/WRITE mbx MBA1234:
    $ WRITE mbx "hello"
  Note that all I/O will be synchronous; a write operation will hang
  pending completion of the corresponding read.   There are no options
  available for modifying this behaviour particular from within DCL.
  There is no supported means for creating a mailbox directly from DCL.
  There are Freeware packages available that permit mailboxes to be
  created and manipulated.  For example, MBX on Freeware V5.0.
  Given the limitations on mailbox I/O from DCL, the OpenVMS Wizard
  strongly encourages use of other approaches.  Programming languages,
  task-to-task DECnet, files, PIPEs or otherwise.
  You have ready access to multiple programming languages on OpenVMS,
  including DCL, Macro32, Java, Perl, Python, Bliss and various other
  languages; all of the languages specified here are either part of
  OpenVMS or are freely-available for use with OpenVMS.

answer written or last revised on ( 18-FEB-2002 )

» close window