CPORT Procedure: UNIX

Writes SAS data sets and catalogs into a transport file.
UNIX specifics: name and location of transport file
See: CPORT Procedure in Base SAS Procedures Guide


PROC CPORT source-type=libref | <libref.> member-name <option(s)> ;

Required Arguments

identifies the files to export as either a single SAS data set, single SAS catalog, or multiple members of a SAS library.
libref | <libref.> member-name
specifies the name of the SAS data set, catalog, or library to be exported.


Note: This version is a simplified version of the CPORT procedure syntax. For the complete syntax and its explanation, see CPORT Procedure in Base SAS Procedures Guide.
Starting in SAS 9.1, you can use the MIGRATE procedure to migrate a SAS library from a previous release. For more information, see the Migrating 32-Bit SAS Files to 64-Bit in UNIX Environments, and the Technical Support Web site.
The CPORT procedure creates a transport file to later be restored (imported) by the CIMPORT procedure. The transport file can contain a SAS data set, SAS catalog, or an entire SAS library.
Typically, the FILE= option is used to specify the path of the transport file. The value of the FILE= option can be a fileref defined in a FILENAME statement or an environment variable. If this option is omitted, CPORT creates the default file Sascat.dat in the current directory as the transport file.

Example: Exporting Files

In this example, a SAS library called oldlib contains multiple SAS data sets and is being exported to the file called transport-file:
libname oldlib 'SAS-data-library';
filename tranfile 'transport-file';

proc cport lib=oldlib file=tranfile;
This transport file is then typically moved by binary transfer to a different host, where the CIMPORT procedure will be used to restore the SAS library.