DATA Step, Macro, Functions and more

Error: File is in use

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Error: File is in use

I've written a program to import a CSV and export an xml file to a SharePoint folder.  All works well except that I get an "Error: File is in use" error the next time I run the program.  I have to restart EG and I get a sas.exe error when closing the program.  Below is the code.  Any suggestions?  It's annoying that I have to restart the program everytime I make a change as I test edits to the program.

 

libname t1 xml '\\xxx.net\corpsys\assessment-testing-program\XML Files\req_candidates.xml' xmltype=MSACCESS xmlmeta=schemadata xmlschema=xsd XMLENCODING='UTF-8';
filename xsd '\\xxx.net\corpsys\assessment-testing-program\XML Files\req_candidate.xsd';
data t1.auto_req_candidates;
      set WORK.auto_req_candidates;
run;


Accepted Solutions
Solution
‎03-19-2017 10:41 PM
Super User
Posts: 19,837

Re: Error: File is in use

Posted in reply to michaeltro

Close both the filename and t1 references.

 

libname t1;
filename xsd clear;

View solution in original post


All Replies
Valued Guide
Posts: 634

Re: Error: File is in use

Posted in reply to michaeltro
Have you tried clearing the T1 libref?
New Contributor
Posts: 3

Re: Error: File is in use

This worked. Also cleared xsd to be safe. Program works fine now. Thanks! Too bad you can't mark both replies as a solution.
Valued Guide
Posts: 634

Re: Error: File is in use

Posted in reply to michaeltro

you picked the right one. :-)

Solution
‎03-19-2017 10:41 PM
Super User
Posts: 19,837

Re: Error: File is in use

Posted in reply to michaeltro

Close both the filename and t1 references.

 

libname t1;
filename xsd clear;
New Contributor
Posts: 3

Re: Error: File is in use

Looks like clearing t1 was the issue, but cleared xsd to be safe. Works fine now. Thanks!
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 721 views
  • 1 like
  • 3 in conversation