SAS Institute. The Power to Know

FOCUS AREAS

Return to previous page

Base SAS

Specifying a Fileref

The LIBNAME statement option XMLFILEREF= specifies a fileref for the physical location of the XML document to be exported or imported.

To assign the fileref, use the FILENAME statement. For example, the following code writes to the XML document named Wilma.xml:

   filename cartoon 'C:\XMLdata\wilma.xml';

   libname bedrock xml xmlfileref=cartoon;

   proc print data=bedrock.wilma;
   run;
Note that the XML engine can access any data referenced by a fileref that is assigned by the FILENAME statement, including the URL access method.