CIMPORT Procedure

Example 1: Importing an Entire Library

Features:

PROC CIMPORT statement option: : INFILE=

Details

This example shows how to use PROC CIMPORT to read from disk a transport file, named TRANFILE, that PROC CPORT created from a SAS library in another operating environment. The transport file was moved to the new operating environment by means of communications software or magnetic medium. PROC CIMPORT imports the transport file to a SAS library, called NEWLIB, in the new operating environment.

Program

libname newlib 'SAS-data-library';
filename tranfile 'transport-file'
                  
host-option(s)-for-file-characteristics;
proc cimport library=newlib infile=tranfile;
run;

Program Description

Specify the library name and filename. The LIBNAME statement specifies a LIBNAME for the new SAS library. The FILENAME statement specifies the filename of the transport file that PROC CPORT created and enables you to specify any operating environment options for file characteristics.
libname newlib 'SAS-data-library';
filename tranfile 'transport-file'
                  
host-option(s)-for-file-characteristics;
Import the SAS library in the NEWLIB library. PROC CIMPORT imports the SAS library into the library named NEWLIB.
proc cimport library=newlib infile=tranfile;
run;

SAS Log


NOTE: Proc CIMPORT begins to create/update catalog NEWLIB.FINANCE
NOTE: Entry LOAN.FRAME has been imported.
NOTE: Entry LOAN.HELP has been imported.
NOTE: Entry LOAN.KEYS has been imported.
NOTE: Entry LOAN.PMENU has been imported.
NOTE: Entry LOAN.SCL has been imported.
NOTE: Total number of entries processed in catalog NEWLIB.FINANCE: 5

NOTE: Proc CIMPORT begins to create/update catalog NEWLIB.FORMATS
NOTE: Entry REVENUE.FORMAT has been imported.
NOTE: Entry DEPT.FORMATC has been imported.
NOTE: Total number of entries processed in catalog NEWLIB.FORMATS: 2