COPY Procedure

Example 2: Converting SAS Data Sets Encodings

Features:
PROC COPY statement options::
NOCLONE
IN=
OUT=
Other features:

CVP engine

Details

This example illustrates how to convert encoding from one type to another type. In order for this example to work correctly, the two encodings must be compatible. For documentation about the “Compatible and Incompatible Encodings,” see SAS National Language Support (NLS): Reference Guide.
 	
LIBNAME inlib cvp 'SAS-library';
LIBNAME outlib 'SAS-library' outencoding=”encoding value for output”;
proc copy noclone in=inlib out=outlib;
   select car;
run;

SAS Log


1    LIBNAME inlib cvp  'SAS-library ';
NOTE: Libref INLIB was successfully assigned as follows:
      Engine:        V9
      Physical Name: SAS-library
2    LIBNAME outlib 'SAS-library’ outencoding=”encoding value for output”;
NOTE: Libref OUTLIB was successfully assigned as follows:
      Engine:        V9
      Physical Name: SAS-library 
3    proc copy noclone in=inlib out=outlib;
4    select car;
5    run;

NOTE: Copying INLIB.CAR to OUTLIB.CAR (memtype=DATA).
NOTE: System Options for BUFSIZE and REUSE were used at user's request.

NOTE: Libname and/or system options for compress, pointobs, data representation and encoding attributes were used at user's request.
NOTE: Data file OUTLIB.CAR.DATA is in a format that is native to another host, or the file encoding does not match the session encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce performance.

NOTE: There were 25 observations read from the data set INLIB.CAR.

NOTE: The data set OUTLIB.CAR has 25 observations and 2 variables.