Previous Page | Next Page

The CPORT Procedure

Overview: CPORT Procedure


Purpose of the CPORT Procedure

The CPORT procedure writes SAS data sets, SAS catalogs, or SAS libraries to sequential file formats (transport files). Use PROC CPORT with the CIMPORT procedure to move files from one environment to another. Transport files are sequential files that each contain a SAS library, a SAS catalog, or a SAS data set in transport format. The transport format that PROC CPORT writes is the same for all environments and for many releases of SAS. In PROC CPORT, export means to put a SAS library, a SAS catalog, or a SAS data set into transport format. PROC CPORT exports catalogs and data sets, either singly or as a SAS library. PROC CIMPORT restores (imports) the transport file to its original form as a SAS catalog, SAS data set, or SAS library.

PROC CPORT also converts SAS files, which means that it changes the format of a SAS file from the format appropriate for one version of SAS to the format appropriate for another version. For example, you can use PROC CPORT and PROC CIMPORT to move files from earlier releases of SAS to more recent releases. PROC CIMPORT automatically converts the transport file as it imports it.

PROC CPORT produces no output (other than the transport files), but it does write notes to the SAS log.


Process for Creating and Reading a Transport File

Here is the process to create a transport file at the source computer and to read it at a target computer:

  1. A transport file is created at the source computer using PROC CPORT.

  2. The transport file is transferred from the source computer to the target computer via communications software or a magnetic medium.

  3. The transport file is read at the target computer using PROC CIMPORT.

    Note:   Transport files that are created using PROC CPORT are not interchangeable with transport files that are created using the XPORT engine.  [cautionend]

For complete details about the steps to create a transport file (PROC CPORT), to transfer the transport file, and to restore the transport file (PROC CIMPORT), see Moving and Accessing SAS Files.

Previous Page | Next Page | Top of Page