I have a requirement to import 17,000 xml files from client into single SAS dataset . I have tried VB script for converting XML to Excel so that i could write a macro in sas to convert these Excel files to SAS datasets, but not working. Please provide your valuable suggestions .
Start with code to read a single XML file. Do your files have identical structure?
Do a Google search for "SAS read xml data". You will get lots of results. Once you have code to read a single file, post it, so we can make suggestions for automation.
Firstly ,pick up one XML to test and find which dataset you need to keep .
filename x temp; libname x xmlv2 'c:\temp\define.xml' xmlmap=x automap=replace ; proc copy in=x out=work; run;
Hi . Thank you for the code . I tried your code on one xml file . It worked . One xml file is split into 8 datasets . It threw the below error .
Can we convert one xml to one dataset instead of 7-8 sub datasets. Once it can be done , we can automate the code for 1000 xmls.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.