[Info-vax] Command Procedure pass value to program READ

Hein RMS van den Heuvel heinvandenheuvel at gmail.com
Mon Feb 7 11:15:25 EST 2022


On Monday, February 7, 2022 at 10:51:35 AM UTC-5, HCorte wrote:
> Is there a way when a program is run in the context of a command procedure to pass a value/string for the READ statement in case of FORTRAN. 
> This way avoiding the user to manualy insert in the terminal a filename for example or someother parameter. 

Symbol substitution doe NOT work for dataline, so that's a non-starter.
Specifically for filenames, logical names will work in the program, so the script could define a logical name value before the run, then provide the logical name as input.

PIPE should work.

The classical OpenVMS workaround is to generate a self deleting helper command line with the DEFIN/USER sys$input sys$command; the run; and the datalines all prepared.

Can you change the program at all?

If so you can see is a logical name or symbol is defined with the required answer and only prompt when not provided already.

Or for simple input I like to just use something line:  ISTAT = LIB$GET_FOREIGN (FILE_NAME, 'File name: ')

Good luck,
Hein




More information about the Info-vax mailing list