Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

execute_command_line

Oivind_Moen
Beginner
731 Views
Hello
I would like to execute_command_lines from inside a intel Fortran 11 program. Is there such a command execute_command_line for MS dos commands?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
731 Views
There are several. SYSTEMQQ and RUNQQ are the two I suggest you look at - the difference is in whether the program waits for the command to finish. Another alternative is the Windows API routine ShellExecute, which has some advantages. You can read about SYSTEMQQ and RUNQQ in the compiler documentation - both require that you add USE IFPORT to the program unit that calls the routine. ShellExecute you can read about here. And if you really want to get "down and dirty", there is always CreateProcessEx.

What sort of command do you want to run?
0 Kudos
Oivind_Moen
Beginner
731 Views
Thank you a lot.
I will try this. The command I plan to execute is opc with some parameters.

It is used to read some process values from a server used for process control via openOPC ( open OLE for process control).

I do not know of any direct calls to read the OPC values and write values to the OPC interface via FORTRAN.

Thank you again for your help.
0 Kudos
Reply