HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- How do you run a C++ EXE from a COM File
Operating System - OpenVMS
1828838
Members
2678
Online
109985
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 08:08 AM
03-05-2007 08:08 AM
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 08:14 AM
03-05-2007 08:14 AM
Solution
The same ways as you run any other executable
from a DCL command procedure?
If you don't need any command-line arguments,
"RUN dev:[dir]program.exe".
If you do need command-line arguments, I'd
define a foreign-command symbol, like:
program = "$ dev:[dir]program.exe"
program arg1 arg2 arg3 [...]
Or, see the VMS FAQ:
http://h71000.www7.hp.com/faq/openvms_faq.html
http://h71000.www7.hp.com/faq/vmsfaq_stmlf.txt
and look for "HOW DO I RUN A PROGRAM WITH
ARGUMENTS?"
from a DCL command procedure?
If you don't need any command-line arguments,
"RUN dev:[dir]program.exe".
If you do need command-line arguments, I'd
define a foreign-command symbol, like:
program = "$ dev:[dir]program.exe"
program arg1 arg2 arg3 [...]
Or, see the VMS FAQ:
http://h71000.www7.hp.com/faq/openvms_faq.html
http://h71000.www7.hp.com/faq/vmsfaq_stmlf.txt
and look for "HOW DO I RUN A PROGRAM WITH
ARGUMENTS?"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 10:20 AM
03-05-2007 10:20 AM
Re: How do you run a C++ EXE from a COM File
Two other options, the the directory containing your image file is in the search path for the logical name DCL$PATH, then just use the name of the image:
$ DEFINE DCL$PATH dir:[dev],...
...
$ program arg1 arg2 arg3 ...
(in other words, similar to Unix, DOS, Windows etc)
You can also avoid defining a foreign command symbol for one off use with the MCR command:
$ MCR dir:[dev]program arg1 arg2 arg3 ...
yes, MCR is undocumented and unsupported, but if it was ever changed, so much existing OpenVMS code would break, it just won't ever happen!
$ DEFINE DCL$PATH dir:[dev],...
...
$ program arg1 arg2 arg3 ...
(in other words, similar to Unix, DOS, Windows etc)
You can also avoid defining a foreign command symbol for one off use with the MCR command:
$ MCR dir:[dev]program arg1 arg2 arg3 ...
yes, MCR is undocumented and unsupported, but if it was ever changed, so much existing OpenVMS code would break, it just won't ever happen!
A crucible of informative mistakes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 12:37 PM
03-05-2007 12:37 PM
Re: How do you run a C++ EXE from a COM File
What did you try?
What is the observed problem?
Any (error) messages?
Is this a batch job, or an interactively activated command file or something more elaborate from a detached process as your prior questionts hint to?
Be specific, be very specific!
Steven and John speculated on argument passing being the problem.
My guess is that you might not know that when you run an image in a command file then that command file is the input stream.
If you want the originating terminal to provide input and then you need to redefine sys$input temporarely, typically using:
$DEFINE/USER SYS$INPUT SYS$COMMAND
Finally, use the force: $HELP and the OpenVMS Documentation set, such as the Userguide!
Good luck,
Hein.
What is the observed problem?
Any (error) messages?
Is this a batch job, or an interactively activated command file or something more elaborate from a detached process as your prior questionts hint to?
Be specific, be very specific!
Steven and John speculated on argument passing being the problem.
My guess is that you might not know that when you run an image in a command file then that command file is the input stream.
If you want the originating terminal to provide input and then you need to redefine sys$input temporarely, typically using:
$DEFINE/USER SYS$INPUT SYS$COMMAND
Finally, use the force: $HELP and the OpenVMS Documentation set, such as the Userguide!
Good luck,
Hein.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP