Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling an External Process

Status
Not open for further replies.

carpe85

Technical User
Jul 26, 2007
1
US
Hi all:

I have been using Fortran 77/90/95 for about 5 years now, but I have never coded anything to call an external process (an executable that runs on DOS), or used win32 API commands.

I have an executable that requires 2 inputs on run-time. The inputs are directory paths to input files(i.e they are strings). The executable then handles the input files and generates some output files on its own. I need to be able to "call" this executable from a Fortran program, tell it the directory paths and then let it run in the background(I don't want it to pop up on the screen or on the DOs box). The reason why I need a code to do this is bacause I have to repeat it 1000 times for different inputs.

I know that you can use: "Call System" or "Call Systemqq", but these two commands don't do what I need. They simply call the executable to the DOS box and I have to use the program manually. I need it to be automatic.

If anyone could please help me with this issue, maybe with some example code lines. I am using both Compaq Visual Fortran and Silverfrost Plato3.
 
Is it feasible to generate a batch file with the 1000 calls with different parameters and just execute the batch file?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top