I'm trying to run a program and get the output value in DCL.
In Linux platform script like below
result=$(./tool -e $parameter1 $parameter2 )
echo "result:" $result
I try to do the same script in HP openVMS platform but fail.
Could anyone provide a sample or give me some tips?
Thanks a lot.
Reference: How to assign the output of a program to a variable in a DCL com script on VMS?
What is the result of your "tool"? As long as it is one line, the answer to a similar, recent question How to store a result to a variable in HP OpenVMS DCL? may help. Other than that, using a pipe command with a temporary output file is probably the easiest solution. Something like
In case you don't know how to pass arguments to your "tool", see how to run a c program with reading command line parameters in openvms?