Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

How do you launch a COM file from a FORTRAN Subroutine?

 
Kenneth Toler
Frequent Advisor

How do you launch a COM file from a FORTRAN Subroutine?

How do you launch a COM file from a FORTRAN Subroutine?
6 REPLIES
Ian Miller.
Honored Contributor

Re: How do you launch a COM file from a FORTRAN Subroutine?

If you mean COM as a DCL procedure

If the FORTRAN is running in a process with DCL then
LIB$SPAWN to run the COM file in a subprocess
____________________
Purely Personal Opinion
Kenneth Toler
Frequent Advisor

Re: How do you launch a COM file from a FORTRAN Subroutine?

If the filname is HELP.COM what would the syntax look like?

Ex

Subroutine HELP()

CALL LIB$SPAWN('HELP.COM',,0,,,,,)

Will the "0" in the call cause it to be in a NOWAIT state. If not please advise.

In DCL HELP.COM would look like:

CREATE/TERMINAL EDIT/READ README.TXT

The overall idea is that I have a FORTRAN DRIVEN MENU that I need to add a HELP SUBROUTINE to and have it launch independantly from the main menu. And when the "EXIT" of the main menu is executed, I would like for the README.TXT TERMINAL to close.
Karl Rohwedder
Honored Contributor

Re: How do you launch a COM file from a FORTRAN Subroutine?

Kenneth, add a @ to the command line, e.g. '@HELP.COM'.

According to your requirments, there is also the LIB$DO_COMMAND, which ends your programm and transfers control to whatever you like. At the end of your subprogramm you must reinvoke your main program.

regards Kalle
Ian Miller.
Honored Contributor

Re: How do you launch a COM file from a FORTRAN Subroutine?

If you are seeking to implement a help facility within your application then consider the use of LBR$OUTPUT_HELP

http://h71000.www7.hp.com/doc/83final/4493/4493pro_034.html#outputhelpmessage

____________________
Purely Personal Opinion
Hein van den Heuvel
Honored Contributor

Re: How do you launch a COM file from a FORTRAN Subroutine?


>> How do you launch a COM file from a FORTRAN Subroutine?

The regular answer really is: with a call to SY$SNDJBC to 'send to job controller', that is... submit as batch job.

However, your subsequent reply clarifies that we are talking about an interactive process here.

The SPAWN "@HELP" will work fine and is probably the right solution.
However it does create two processes to do the job for one.

You could consider calling decwindows to do it in one go. For this I would start by reading reading up on DECTERMPORT in the Decwindows Motif guide to appliation programming appendix A.

http://h71000.www7.hp.com/doc/732final/documentation/pdf/dw_guide_app_prog.pdf

fwiw,
Hein.
Jan van den Ende
Honored Contributor

Re: How do you launch a COM file from a FORTRAN Subroutine?

Kenneth,

from your Forum Profile:


I have assigned points to 46 of 67 responses to my questions.


Maybe you can find some time to do some assigning?

http://forums1.itrc.hp.com/service/forums/helptips.do?#33

Mind, I do NOT say you necessarily need to give lots of points. It is fully up to _YOU_ to decide how many. If you consider an answer is not deserving any points, you can also assign 0 ( = zero ) points, and then that answer will no longer be counted as unassigned.
Consider, that every poster took at least the trouble of posting for you!

To easily find your streams with unassigned points, click your own name somewhere.
This will bring up your profile.
Near the bottom of that page, under the caption "My Question(s)" you will find "questions or topics with unassigned points " Clicking that will give all, and only, your questions that still have unassigned postings.

Thanks on behalf of your Forum colleagues.

PS. - nothing personal in this. I try to post it to everyone with this kind of assignment ratio in this forum. If you have received a posting like this before - please do not take offence - none is intended!

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.