Examples of Data Transfer Services (DTS) |
Purpose |
SAS/CONNECT facilitates the distribution of information to multiple clients. Rather than distributing files on diskettes, you can make one central file available on the server that each client can access and copy.
For example, suppose that you want to distribute an updated executable to other Windows computers in your organization. You decide that the most efficient way to update all computers is to upload PROGRAM.EXE to the server, and notify each person who uses this software on their workstations that the file is available and should be downloaded. This method enables all clients to quickly access the updated software, and eliminates the need to share a physical diskette among client users.
Note: Such a SAS/CONNECT application, in which an external nontext file is uploaded and then downloaded, requires the BINARY option in the DOWNLOAD and UPLOAD procedures. The BINARY option transfers files without any character translation (for example EBCDIC to ASCII) or insertion of record delimiters.
Programs |
Example 10.1: UPLOAD |
The PROGRAM.DLL module must first be uploaded to an external file on the server.
rsubmit; filename rfile 'server-file'; proc upload infile='a:\program.dll' outfile=rfile binary; run; endrsubmit;
This example uses a SAS FILENAME statement to identify the target file on the server.
Note: The INFILE= and OUTFILE= options are specified in the PROC UPLOAD statement in order to upload an external file. To upload a SAS data set, the DATA= and OUT= options should be used.
Example 10.2: DOWNLOAD |
With the PROGRAM.DLL module available on the server, each client at the installation can acquire the updated module by downloading it from the server.
The process for downloading the PROGRAM.DLL module is like the process for uploading, except that the DOWNLOAD procedure is invoked, and the target file is on the server, not on the client. The following example copies the PROGRAM.DLL module to directory \SAS\SASEXE.
rsubmit; filename rfile 'server-file'; proc download infile=rfile outfile='\sas\sasexe\program.dll' binary; run; endrsubmit;
This example uses a SAS FILENAME statement to identify the target file on the server. The INFILE= and OUTFILE= options are used in the PROC DOWNLOAD statement.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.