Patrick,

VMS is not Unix, but you _may_ be able to get your Unix syntax to work if
you hold your tongue correctly.

At some point in the history of VMS, a command called "pipe" was
introduced, which appears to implement a lot of Unix I/O redirection
functionality, including pipes and ">" redirection. So

open OUTPUT, "pipe some_command 2>&1 |";

may do what you want.

Or it may not. One thing to beware of is that VMS doesn't really have
pipes; instead it has something called (confusingly) mailboxes. These have
nothing to do with mail in the sense of SMTP and friends, rather they are
an interprocess communication mechinism. But they differ from pipes in a
number of important respects. The most annoying of these is that they pass
data in terms of I/O operations rather than bytes. That is to say, if you
write to a mailbox and I read it, I get what you wrote in the last
operation, AND ONLY what you wrote in the last operation. This is a problem
when applications do input or output via "getc" and "putc".

If you run into this, the only way I know to deal with it is to send the
output to a file and then read the file. Most VMS commands (but not all,
unfortunately!) have a /OUTPUT= qualifier to send the output to a file. If
the command you want doesn't have this, you can issue the commands
$ assign/user_mode output_file.dat sys$output
$ assign/user_mode output_file.dat sys$error
$ some_command
All three of the above MUST BE ISSUED IN THE SAME PROCESS. So you'll have
to write them all to a scratch file, and then execute that file as a
command procedure.

Tom Wyant




This communication is for use by the intended recipient and contains 
information that may be privileged, confidential or copyrighted under
applicable law.  If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited.  Please notify the sender
by return e-mail and delete this e-mail from your system.  Unless
explicitly and conspicuously designated as "E-Contract Intended",
this e-mail does not constitute a contract offer, a contract amendment,
or an acceptance of a contract offer.  This e-mail does not constitute
a consent to the use of sender's contact information for direct marketing
purposes or for transfers of data to third parties.

 Francais Deutsch Italiano  Espanol  Portugues  Japanese  Chinese  Korean

            http://www.DuPont.com/corp/email_disclaimer.html


Reply via email to