CPORT Procedure

Example 2: Exporting Individual Catalog Entries

Features:

PROC CPORT statement option:: FILE=

SELECT statement

Details

This example shows how to use PROC CPORT to export individual catalog entries, rather than all of the entries in a catalog.

Program

libname source 'SAS-data-library';
filename tranfile 'transport-file'
                  
host-option(s)-for-file-characteristics;
proc cport catalog=source.finance file=tranfile;
select loan.scl;
run;

Program Description

Assign library references. The LIBNAME and FILENAME statements assign a libref for the source library and a fileref for the transport file, respectively.
libname source 'SAS-data-library';
filename tranfile 'transport-file'
                  
host-option(s)-for-file-characteristics;
Write an entry to the transport file. SELECT writes only the LOAN.SCL entry to the transport file for export.
proc cport catalog=source.finance file=tranfile;
select loan.scl;
run;

SAS Log


NOTE: Proc CPORT begins to transport catalog SOURCE.FINANCE
NOTE: The catalog has 5 entries and its maximum logical record length is 866.
NOTE: Entry LOAN.SCL has been transported.