The CPORT procedure writes SAS data sets, SAS catalogs, or SAS data 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 data 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 data 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 data library. PROC CIMPORT restores ( imports ) the transport file to its original form as a SAS catalog, SAS data set, or SAS data library.
Only PROC CIMPORT can read the transport files that PROC CPORT creates. For information on the transport files that the transport engine creates, see the section on SAS files in SAS Language Reference: Concepts .
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. In such cases, PROC CIMPORT automatically converts the contents of 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.
To export and import files, follow these steps:
Use PROC CPORT to export the SAS files that you want to transport.
If you are changing operating environments, move the transport file to the new machine by using either communications software or a magnetic medium.
Note: If you use communications software to move the transport file, be sure that it treats the transport file as a binary file and that it modifies neither the attributes nor the contents of the file.
Use PROC CIMPORT to translate the transport file into the format appropriate for the new operating environment or release.