You can assign filerefs to external files that you access with the following FILENAME access methods:
CATALOG
FTP
TCP/IP SOCKET
URL.
Examples of how to use each method are shown in the following table:
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 URL 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 SOCKET specifier | filename myfile URL ' external-file ' < url-options >; |
See SAS Language Reference: Dictionary for detailed information about each of these statements.