Most likely cause is that another program or section of your SAS close has the file 'open'.
If you had an ODS <any destination> file = 'name';
but have not closed it yet, then previous code would hold it.
If you have the file open in Base SAS, another SAS session or process flow, or another editor or viewer it may be in use and unavailable.
Or if you work in a shared environment another user could have it open.