This example uses the
COPY procedure to restore one or more data sets from a transport file.
libname xportin xport
'transport-file';
libname target 'SAS-data-library';
proc copy in=xportin out=target;
select grades;
run;
In the preceding example, the libref
XPORTIN points to the location where the transport file was transferred
to the target operating environment. The XPORT engine in this LIBNAME
statement specifies that the transport file at this location is to
be read in transport format. The libref TARGET points to a new location
where the transport file will be copied in native format. The PROC
COPY statement copies the selected data set GRADES from the library
that is identified in the IN= option to the new library that is identified
in the OUT= option.
Using a SELECT statement, you specify one or more specific
data sets to be copied to the new library. To specify that all data
sets in the transport file be copied, omit the SELECT statement from
PROC COPY.
Note: You can use the EXCLUDE statement
in PROC COPY to omit explicitly the data sets that you do not want
instead of using the SELECT statement to specify the data sets that
you want.