Using the following code:
filename sdn 'C:\Users\student05\Documents\sdn.xml';
filename SXLEMAP 'C:\Users\student05\Documents\sdn.map';
libname sdn xmlv2 xmlmap=SXLEMAP;
proc datasets lib=sdn;
run;
SAS does not read XML variables.
Details, details, details.
What did the log show when you ran the code? The best way to answer this question is to copy the entire log of the code that you show including the code and any messages from SAS. Copy directly from the log and paste into a code box opened using the forum's {I} or "running man" icon to preserve formatting.
Do you know which version of XMLMAP syntax is used in that SDN.MAP file? There are version restrictions on the engine used and the map file.
From the documentation:
Restrictions The XMLV2 engine nickname supports XMLMap syntax versions 1.2, 1.9, and 2.1. The XMLV2 engine nickname does not support XMLMap versions 1.0 or 1.1. The XML engine nickname supports XMLMap syntax versions 1.0, 1.1, and 1.2. The XML engine nickname does not support XMLMap syntax versions 1.9 or 2.1.
So you may be using the incorrect engine and want XML instead of XMLV2.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.