BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jose7
Obsidian | Level 7

Hi experts,

 

I have a sas table like "xxx.sas7bdat", and i want to generate a xml file. can i do this directly using proc export?

proc export data=personal.xxx
outfile="/sasdatos/xml_file"

dbms= ???    replace;

quit;

or i have to do other step and then generate the xml file ?

 

Thks!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

LIBNAME XMLV2 most likely.

 

libname myXml xmlv2 '/home/fkhurshed/Demo1.xml';

proc copy in=sashelp out=myXml;
select class;
run;

libname myXml;



https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/engxml/n0x0j8m1awgbcxn1pz3a3lc3tta4.htm

 

If you need to have a custom map, see the left hand side of the docs on how to export using an xml map.

 


@Jose7 wrote:

Hi experts,

 

I have a sas table like "xxx.sas7bdat", and i want to generate a xml file. can i do this directly using proc export?

proc export data=personal.xxx
outfile="/sasdatos/xml_file"

dbms= ???    replace;

quit;

or i have to do other step and then generate the xml file ?

 

Thks!


 

View solution in original post

1 REPLY 1
Reeza
Super User

LIBNAME XMLV2 most likely.

 

libname myXml xmlv2 '/home/fkhurshed/Demo1.xml';

proc copy in=sashelp out=myXml;
select class;
run;

libname myXml;



https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/engxml/n0x0j8m1awgbcxn1pz3a3lc3tta4.htm

 

If you need to have a custom map, see the left hand side of the docs on how to export using an xml map.

 


@Jose7 wrote:

Hi experts,

 

I have a sas table like "xxx.sas7bdat", and i want to generate a xml file. can i do this directly using proc export?

proc export data=personal.xxx
outfile="/sasdatos/xml_file"

dbms= ???    replace;

quit;

or i have to do other step and then generate the xml file ?

 

Thks!


 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

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
  • 1 reply
  • 656 views
  • 3 likes
  • 2 in conversation