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!


 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1180 views
  • 3 likes
  • 2 in conversation