Previous Page | Next Page

Procedures under UNIX

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

See Also


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


This version is a simplified version of the CPORT procedure syntax. For the complete syntax and its explanation, see the "CPORT Procedure" in the Base SAS Procedures Guide.  [cautionend]


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:   Starting in SAS 9.1, you can use the MIGRATE procedure to migrate a SAS library from a previous release. For more information, see Migrating 32-Bit SAS Files to 64-Bit in UNIX Environments, and Migration at  [cautionend]

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.


In this example, a SAS library (called oldlib ) that contains multiple SAS data sets 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.

See Also

Previous Page | Next Page | Top of Page