- Example 1:
- The next program reads a transport file from tape containing SAS data sets.
cms filedef tran tap1 nl
(recfm fb lrecl 80 blksize 8000;
run;
libname tran xport;
libname mylib 'a';
proc copy in=tran out=mylib;
run;
- Example 2:
- The transport file was made on the originating machine with PROC COPY or a DATA step with the XPORT engine, PROC COPY with the SASV5XPT engine on PC Release 6.03/6.04,
or PROC XCOPY. The libref TRANS points to the transport file and specifies that the XPORT engine be used to access that file. PROC COPY copies all the SAS data sets from the transport
file to the B minidisk. These files will have SASDATA as the filetype because that is the libref that was used in the LIBNAME statement. To limit which SAS data sets are
copied, you can use either the SELECT or EXCLUDE statement in PROC COPY.
libname sasdata 'b';
libname trans xport 'tranfile receive a';
proc copy in=trans out=sasdata;
run;
- Example 3:
- This example is the same as Example 2 except for the first LIBNAME statement. In the first LIBNAME statement, OUTDATA is the libref or the nickname but
not the filetype. The filetype will be SASDATA, and the files will be stored on the B minidisk.
libname outdata 'sasdata b';
libname trans xport 'tranfile receive a';
proc copy in=trans out=outdata;
run;
- Example 4:
- If the transport file was created by PROC CPORT on the originating machine, you need to use PROC CIMPORT to process the transport file. In this example, we are
assuming that you are moving files from a LOWER to a HIGHER release. PROC CIMPORT uses the file given on the INFILE= option as input and writes/unpacks/copies all data sets found in
the transport file to the C minidisk and gives them the filetype of SASFILES.
libname sasfiles 'c';
proc cimport infile='portfile receive a'
library=sasfiles;
run;