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

HCorte hmmbcorte at gmail.com
Mon Feb 7 10:51:34 EST 2022


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.

script.com
$!example
$! DEFINE/USER_MODE SYS$INPUT SYS$COMMAND
$RUN PROGRAM_EXAMPLE
---inject the input value to the READ FILENAME---



program_example.for
      IMPLICIT NONE
        CHARACTER*60  FILENAME
....


        WRITE(*,*) 'ENTER FILE NAME:'
        READ(*,*) FILENAME
C        write(*,*) 'File Name is: ',FILENAME
....



More information about the Info-vax mailing list