This example uses
the CPORT procedure to create a transport file for one data set.
libname source 'SAS-data-library';
filename cportout 'transport-file';
proc cport data=source.grades file=cportout;
run;
In the preceding example, the libref
SOURCE points to the original location of the data set that is on
the source computer. The fileref CPORTOUT points to a new location
where the transport file will be created. The PROC CPORT statement
copies, as its source, the file that is identified in the DATA= option
to the new transport file that is identified in the FILE= option.
The DATA= option specifies only one data set to be transported.
To include the entire contents of
a library, which can contain multiple catalogs and data sets, specify
the LIBRARY= option instead of the DATA= option in PROC CPORT.
Here is an example of
PROC CPORT that specifies that all data sets in the library be transported:
proc cport library=source file=cportout memtype=data;