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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.