The first LIBNAME statement aliases the library
reference (libref) misc to the ~/work
directory.

The second LIBNAME statement aliases the libref
sasxpt with the physical name of the SAS transport format
file (~/outdata/portable.xpt).

The COPY procedure copies one or more SAS data sets
in the IN= libref (in this case, misc) to
the OUT= libref (in this case, sasxpt).

The SELECT statement specifies that only the file
job1.sas7bdat should be included in the transport file
~/outdata/portable.xpt.

Note: The filenames and pathnames in the above
example follow Unix conventions. If you use SAS for
Windows, use the appropriate Windows filename and pathname
conventions. For example, in SAS for Windows, the two
LIBNAME statements in the above example would instead
be:

If you have questions about using statistical and mathematical software at Indiana University, contact Research Analytics. Research Analytics is located on the IU Bloomington campus at Woodburn Hall 200; staff are available for consultation Monday-Friday 9am-noon and by appointment.