Thanks for the info. I had the same issue to use %ABORT CANCEL statement as well. I recently got help from SAS instructor Allison Saito for a workaround solution which worked well - using below code can properly close the environment files and run other code again without '..file in use' error - ...... ODS HTML CLOSE; ODS HTML5 (ID=WEB) CLOSE; ODS RTF (ID=WEB) CLOSE; ODS PDF (ID=WEB) CLOSE; %ABORT CANCEL;
... View more