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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.