Using a Custom Tagset Template

The following code uses the tagset template PARTSAUCTION created in the previous example to create the XML output file PARTSLIST. Figure 12.14 shows the XML file created using PROC PRINT on the WORK.PARTSAUCTION data set.

ODS PATH work.tagtemp(update) sashelp.tmplmst(read);
ODS TAGSETS.PARTSAUCTION FILE='PartsList.xml';
proc print data=partsauction noobs;
  title 'Online Parts Auction';
  var partnum partdesc sellerid askprice;
run;
ODS _ALL_ CLOSE;

Comparing the final XML output file in Figure 12.14 to the PROC TEMPLATE code that created the output file, you can see that the row events and the data events executed more than once. The header event executed once for each column header. The DOC event executed twice in ...

Get Output Delivery System: The Basics and Beyond now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.