Hi there, I tried the code as below: %macro import_xml (filename=,ds=); filename inxml "C:\Users\ASHU\Desktop\Test\&filename..xml"; filename map 'C:\Users\ASHU\Desktop\Test\ashugenerate.map'; libname mylibxml xmlv2 automap=replace xmlmap=map; proc print data=mylibxml.team; filename inxml clear; filename map clear; libname mylibxml clear; %mend import_xml; filename tmp pipe 'dir "C:\Users\ASHU\Desktop\Test"'; data _null_; infile tmp; length buff $200; input buff $; call execute('%import_xml (filename='||strip(buff)||',ds=out_dataset'||strip(put(_n_,best.))||');'); run; however I am getting the error as below: NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE PRINT used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 27 + proc print data=mylibxml.team; filename inxml clear; filename map clear; libname ERROR: Libname MYLIBXML is not assigned. NOTE: Fileref INXML has been deassigned. NOTE: Fileref MAP has been deassigned. 28 + mylibxml clear; WARNING: Libname MYLIBXML is not assigned. 28 + ; 29 + filename inxml "C:\Users\ASHU\Desktop\Test\2.xml"; filename map 'C:\Users\ASHU\Desktop\Test\ashugenerate.map'; libname mylibxml xmlv2 automap=replace xmlmap=map; ERROR: The XMLV2 engine cannot be found. ERROR: Error in the LIBNAME statement. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE PRINT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 29 + proc print data=mylibxml.team; filename inxml clear; filename map clear; libname ERROR: Libname MYLIBXML is not assigned. NOTE: Fileref INXML has been deassigned. NOTE: Fileref MAP has been deassigned. 30 + mylibxml clear; WARNING: Libname MYLIBXML is not assigned. I understand that the Libname need to be assigned however I tried assigning a Libname but it's still giving me an error. Can you please help and let me know as in what's going on. Thank you so much for your help. Sonia
... View more