NOTE: When moving to UNIX, it is possible to store SAS Transport Files as such in UniTree, then access them directly from there. This is especially convenient for large data sets that would be impossible to store on disk and/or cumbersome to move back and forth from UniTree to UNIX disk for analysis. Details can be found in the general SAS help document or in the specific "SAS and UniTree" excerpt in
To accomplish the transfer of SAS Data Sets from one operating system to another it is necessary to
For details on the procedures outlined below, users are encouraged to use SAS Language: Reference, Version 6 Edition. Also helpful is a special SAS Technical Report, No. P-195, available only from SAS Institute, and titled, "Transporting SAS Files Between Host Systems".
Some data transfer operations will require the use of documents that go beyond the one you are now reading. For one thing, it is important to note that the examples in this section assume moderate-sized data sets. Larger data sets may require increased space allocations or other manipulations when sending and/or receiving. Such manipulations are specific to the method of transfer or operating system(s) involved, and since the possibilities are quite numerous they cannot be documented here in detail. See related User's Manuals and documents for assistance.
libname olddata '/home/almaak/user12/sasdata'; **this is
the directory where the
SAS Data Sets are;
filename guava '/home/almaak/user12/portfile.xpt';
proc cport data=olddata.mydata1 file=guava;
portfile.xpt is in the same directory
where you invoked SAS, you don't need the path shown in the example.
Also, you can substitute ~/ for your home directory in
any path expression.Example 2: (Sending from SAS for Windows)
libname olddata 'c:\sasdata'; **this is the directory
where the SAS Data Sets are;
filename guava 'a:portfile.xpt';
proc cport data=olddata.mydata1 file=guava;
olddata and the file to which the
transport version of the data is to be written is designated as
guava, which is just a nickname (or FILEREF) for the actual
file to be created on the A: drive, called portfile.xpt.
If the receiving system is Windows, the transport file is identified by a FILENAME statement, and the permanent library is identified by a LIBNAME statement:
libname olddata 'c:\my\sasdata'; **SAS Data Sets
will be written here;
filename cumquat 'a:portfile.xpt';
proc cimport library=olddata infile=cumquat;
cumquat, which is just a nickname (or FILEREF)
for the actual file portfile.xpt
which for this example is shown on the diskette in A:\.
The location in which the SAS Data
Set(s) will be written is designated as olddata.
PROC CIMPORT
allows specifications other than LIBRARY to designate the output
SAS Data Set location and name. See the
SAS documentation on PROC CIMPORT for details.NOTE: Moving SAS data sets or catalogs from one Windows machine to another Windows machine requires no transport files. Files may simply be placed on a diskette or ZIP disk and carried or sent to the target machine. If you will be moving the files from one Windows machine to another Windows machine using eMail or ftp, however, transport files should be used anyway to avoid possible corruption.
Example 2: (Receiving at UNIX)
If the receiving system is UNIX, the transport file is identified by a FILENAME statement, and the permanent library is identified by a LIBNAME statement:
libname olddata '/home/almaak/username'; **SAS Data Sets
will be written here;
filename cumquat '/home/almaak/username/portfile.xpt';
proc cimport library=olddata infile=cumquat;
~/.) The file from
which the transport version of the data is to be read is
designated as cumquat, which is just a nickname (or FILEREF)
for the actual file previously placed in the "home" directory,
and called portfile.xpt. The location in which the SAS Data
Set(s) will be written is designated as olddata. PROC CIMPORT
allows specifications other than LIBRARY to designate the output
SAS Data Set location and name. See the
SAS documentation on PROC CIMPORT for details.
Example 1: (Receiving at Windows, using PROC COPY):
libname olddata 'c:\sasdata'; **SAS Data Sets
are written here;
libname pear xport 'a:portfile.xpt';
proc copy in=pear out=olddata; select peach guava;
libname olddata '/home/almaak/username'; **SAS Data Sets
are written here;
libname pear xport '/home/almaak/username/portfile.xpt';
proc copy in=pear out=olddata; select peach guava;
Example 3: (Receiving at Windows, using DATA step):
libname olddata 'c:\sasdata'; **SAS Data Sets
are written here;
libname pear xport 'a:portfile.xpt';
data olddata.apple; set pear.peach;
libname olddata '/home/almaak/username'; **SAS Data Sets
are written here;
libname pear xport '/home/almaak/username/portfile.xpt';
data olddata.apple; set pear.peach;
Consulting. The ITS Consultants may be familiar with the language and general operations of this software, but it may be necessary to make an appointment with a member of the full time staff in order to receive detailed help. Support of statistics software is the responsibility of the ITS Statistics Consultant with the participation of other full-time ITS staff. These people may be contacted through the ITS Customer Support Center as shown here.
Customer Support. USC students, staff or faculty who would like information about ITS Workshops or about obtaining site-licensed software or other computing-related questions should visit the Customer Support Center in Leavey Library Lower Commons, or call 213.740.5555, or send eMail to <consult@usc.edu>
Documentation. This document, and many others on a variety of topics, are available in the ITS Customer Support Help System, available on the World Wide Web at:
http://www.usc.edu/its/
You can find Statistics Software Help Documents through the search engine at this same URL, or go directly to them at:
http://www.usc.edu/its/doc/statistics/help/
Newsgroups. Another source of information, this one providing the opportunity to exchange thoughts with other users, is the newsgroup 'usc.comp.all.stat.users'. For more information about reading news, subscribing to newsgroups, and related topics, visit
http://www.usc.edu/its/doc/internet/news/