[Info-vax] Command Procedure Pipe output to a variable
VAXman- at SendSpamHere.ORG
VAXman- at SendSpamHere.ORG
Thu Sep 2 10:11:31 EDT 2021
In article <ddc075a6-9d44-418e-964b-b61d69f8f471n at googlegroups.com>, HCorte <hmmbcorte at gmail.com> writes:
>One more question finished the command procedure, know whanted to pass a variable/symbol to a program in fortran.
>Posted the question in "comp.lang.fortran" but forgoted to specify in the initial inquiry/question that was using OpenVMS.
>
>One suggestion was to use "EXECUTE_COMMAND_LINE" that from what could tell its specific to Unix, and also "popen" from what could get also Unix specific is there a equivalent for OpenVMS?
>
>$ FORTRAN /VERSION
>HP Fortran V8.2-104939-50H96
>
>$ SHOW SYSTEM
>OpenVMS V8.4
There are several ways.
You could employ the CLI$ routines and your own command definition (.CLD).
... or...
You could place the value in a DCL symbol and then, in your program, call
LIB$GET_SYMBOL.
... or...
You could also use LIB$GET_FOREIGN or LIB$GET_INPUT to obtain a value for
use in your program.
... or...
Not knowing your Fortran program, you could also use a Fortran READ. If
it's in a DCL procedure, $ DEFINE/USER SYS$INPUT SYS$COMMAND just before
you run your Fortran program.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
I speak to machines with the voice of humanity.
More information about the Info-vax
mailing list