Filenames from Command Line

Is there Filenames from Command Line option in PGI Visual Fortan?

Instead of hardcoding an input file name in a source code as
Open(UNIT=IUNIT, File=‘Input.txt’),
I’m trying to make it so that users can specify the input file name in the command line.

Are you talking about, say, the following:

$ myprogram.exe input.txt

where the input file is specified as an argument to the executable? If so, the best way to do that is with GET_COMMAND_ARGUMENT, a Fortran 2003 intrinsic that is pretty much portable at this point, and any reasonably new version of PGI will have it.

I did not know there is such GET_COMMAND_ARGUMENT intrinsic in Fortran 2003.
It worked just fine using it.

Thank you very much for your help.