I maintain an in-house (mostly) Fortran application that runs on VMS, Windows, and IRIX. At the end of a run the application opens a file and writes information about the date and time it was run, who ran it, and so on. Most of the source code is the same for all three versions; the OS-dependent parts have been pretty well isolated.
The VMS version uses a logical name for the file in the code. I can change the definition of the logical if necessary without having to modify the code.
The Windows version has the file name and path hard coded. A company mandate about security forced the location of the file to change, and now there is an error every time the application tries to open the file. The application still runs, but we're losing our usage information.
Can I replace the hard-coded file name and path in the Windows version with a system environment variable to give that version the same capability to point to a different file like the VMS version does? If not, then is there something else I can do to accomplish this?