BookmarkSubscribeRSS Feed
cybharg
Fluorite | Level 6

Need to import a hierarchical XML file where one of the tags can contain up to 2,147,483,647 characters. I've created the XML map but not able to import this tag into SAS since its longer than 32767 characters. Can anyone help.

 

I've attached a sample XML and its map.

 

I also have to make some changes to this file and export it back as XML.

 

Thanks.

3 REPLIES 3
Patrick
Opal | Level 21

@cybharg

SAS 9.4 can't deal with such long strings in a single variable. In SAS Viya the new data type VARCHAR can hold up to 2GB but I don't know to what degree the XML engine has already been implemented there.

 

If using a recent SAS9.4 version: You could try and use Python instead; or use Python or any other tool which allows you to deal with such long strings directly without any SAS involvement. 

cybharg
Fluorite | Level 6
Thanks Patrick.. I'll try Python..
AlanC
Barite | Level 11

I use C# which has XML at its core. Yes, it runs on Linux too.

 

Look at XDocument which reads it straight in. Also, very good paper at this years SGF on VARCHAR and its support right now in SAS (outside of Viya). Some limitations however.

https://github.com/savian-net

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1109 views
  • 2 likes
  • 3 in conversation