The SAS Output Delivery System and reporting techniques

How to convert SAS output to XML file

Reply
New Contributor
Posts: 2

How to convert SAS output to XML file

I have sas output, but no data, Is it possible to convert the SAS output to XML?

Super User
Posts: 24,010

Re: How to convert SAS output to XML file

Posted in reply to amypandit

What are you calling 'SAS output' and what do you mean by XML? Are you referring to the tagset version or a file that you want to open with Excel?

 

 

New Contributor
Posts: 2

Re: How to convert SAS output to XML file

I would like to convert SAS output (.lst) to XML?  any method is fine with me,  Is there a way?

Super User
Posts: 24,010

Re: How to convert SAS output to XML file

Posted in reply to amypandit

Not one that would have any decent structure. What is the end goal here? XML are structured output, LST files are designed for viewing/reporting.  ODS TAGSETS.EXCELXP generates a type of XML file but it looks like an Excel file. You can try that I suppose, and see if it meets your needs.

 

ods tagsets.excelxp file='demo.xml' style=meadow;

proc print data=sashelp.cars(obs=10);
run;

proc print data=sashelp.class(obs=5);
run;

ods tagsets.excelxp close;

And then if you want a data set to an XML file you can use ODS XML.

 

 libname newfile xml 'c:\_localdata\temp.xml'
           xmltype=export;
   data newfile.test;
      set sashelp.class;
   run;

   libname newfile;
Ask a Question
Discussion stats
  • 3 replies
  • 105 views
  • 0 likes
  • 2 in conversation