- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- DEC C++ question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО11-12-2007 02:37 AM
тАО11-12-2007 02:37 AM
Is it possible to call DCL commands or a .com file,from DEC C/C++.
I donot have much programming skills on C/C++ except the basic ones.
Pls also suggest how to compile.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2007 03:09 AM
тАО11-12-2007 03:09 AM
Re: DEC C++ question
have a look at the library routines LIB$DO_COMMAND and LIB$SPAWN to see if they are suitable for what you want.
http://h71000.www7.hp.com/doc/82final/5932/5932pro_014.html#do_command
The link below will take you to the User Guide for C. It sounds as though you need to go through a few of the overview chapters to familiarise yourself with compiling C programs,
http://h71000.www7.hp.com/commercial/c/docs/5492profile_contents.html#toc_chapter_1
Regards,
Duncan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2007 05:29 AM
тАО11-12-2007 05:29 AM
Re: DEC C++ question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2007 05:34 AM
тАО11-12-2007 05:34 AM
Re: DEC C++ question
Fox,
Many (but not all) DCL commands are available as functions and thus are more efficiently done directly from a program than from DCL... as far as the execution is concerned.
Granted, For many if us writing the code is actually more efficiently done in DCL.
If this is about a once and hour/once a day task, then by certainly just SPAWN a command(file. Just use the C build in 'system' call (or fork where appropriate).
But if you need to do something every minute or faster, or while holding a critical lock, then you may want to use a calleable interface.
Like LIB$GETJPI or CONV$CONVERT or LIB$RENAME or SYS$OPEN + XAB's to get RMS details, SYS$SNDJBC and so on.
So to help you better, you may want to provide details on what such command file is likely have to do.
Hope this helps some,
Hein van den Heuvel (at gmail dot com)
HvdH Performance Consulting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2007 06:29 PM
тАО11-12-2007 06:29 PM
Solution$ ty fox.c
#include
void main()
{
system ("show time");
}
$ cc fox
$ link fox
$ r fox
13-NOV-2007 00:28:08
$
Note there is a performance cost associated
with frequent system()calls.
Guy Peleg
BRUDEN-OSSG
http://www.brudenossg.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-23-2007 12:06 AM
тАО11-23-2007 12:06 AM
Re: DEC C++ question
Thanks to all for providing the info.
Is there any C++ functions to call a DCL .com
file and execute accordingly...
An example would be very helpful.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-23-2007 12:46 AM
тАО11-23-2007 12:46 AM
Re: DEC C++ question
Apparently not. Try the example you already
got. If that works, try changing:
system ("show time");
to something like:
system ("@ DCL.com");