Referencing External Files with Other Access Methods

You can assign filerefs to external files that you access with the following FILENAME access methods:
  • CATALOG
  • FTP
  • TCP/IP SOCKET
  • URL
  • WebDAV
Examples of how to use each method are shown in the following table:
Referencing External Files with Other Access Methods
External File Task
Tool
Example
Assign a fileref to a SAS catalog that is an aggregate storage location.
FILENAME with CATALOG specifier
filename mycat catalog 'catalog' 
   <catalog-options>;
Assign a fileref to an external file accessed with FTP.
FILENAME with FTP specifier
filename myfile FTP 'external-file' 
   <ftp-options>;
Assign a fileref to an external file accessed by TCP/IP SOCKET in either client or server mode.
FILENAME with SOCKET specifier
filename myfile SOCKET 'hostname: portno' 
   <tcpip-options>;
or
filename myfile SOCKET ':portno' SERVER 
   <tcpip-options>;
Assign a fileref to an external file accessed by URL.
FILENAME with URL specifier
filename myfile URL 'external-file' 
   <url-options>;
Assign a fileref to an external file accessed on a WebDAV server.
FILENAME with WEBDAV specifier
filename myfile WEBDAV 'external-file'
   <webdav-options>;
See SAS Statements: Reference for detailed information about each of these statements.