Unless each program is being EXECUTED individually, and not from within another COBOL program environment variables will not work on this case.
So please ignore the following if you do not use CALL program to open different files.
My advise to you would be to change all your programs so the files are assigned to a working storage variable, and to populate those variables first time program is called with the correct location based on a configuration file storing the path & filename of each individual file on a per program bases.
small sample configuration file based on your data
setd0ctl F1 data\Data1.DAT
setd0ctl F2 data\Data2.DAT
setd0ctl F3 data\Data3.DAT
setd0ctl F4 data\AQIN.DAT
Rep0ctl F1 report\Report1.RPT
Rep0ctl F2 report\Report2.RPT
On each program containing files to be opened, a new small program would be called passing the program name, and this program read the configuration file, and then would return the location of each of the files required for that program. Simple then to move the return values to the required WS variables and open the files as normal.
On my programs I have the above configuration file defined as a Indexed file, with a key of program + file_ID, and with the location variable defined as X(200).
My program is called once per file, but could easily be changed to return all the files used by a program on a array in one go.
For the location of the configuration file above, a environment variable could be used, as this would not change.
Regards
Frederico Fonseca
SysSoft Integrated Ltd
FAQ219-2884
FAQ181-2886