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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: