CPORT and CIMPORT procedures
In the source environment, PROC CPORT writes data sets or catalogs to transport
format. In the target environment, PROC CIMPORT translates the transport file into
the target environment's format.
Data transfer services in SAS/CONNECT software
Data transfer services is a bulk data transfer mechanism that transfers a disk copy of
the data and performs the necessary conversion of the data from one environment's
representation to another's, as well as any necessary conversion between SAS
releases. You must establish a connection between the two SAS sessions by using the
SIGNON command and then executing either PROC UPLOAD or PROC
DOWNLOAD to move the data.
Remote library services in both SAS/CONNECT software and SAS/SHARE software
Remote library services gives you transparent access to remote data through the use
of the LIBNAME statement.
Creating Files in a Different Data Representation
By default, when you create a new file, SAS uses the data representation of the CPU that
is running SAS. You can specify the OUTREP= option to override this default.
The OUTREP= option is both a SAS data set option and a LIBNAME statement option.
The data set option applies to an individual file. The LIBNAME statement option applies
to an entire library. This option uses CEDA to create a file that has a different data
representation.
For example, in a UNIX environment, you can create a data set with the data
representation of WINDOWS_32. If you move that data set to a Windows environment
and process the data set with 32-bit SAS for Windows, you do not invoke CEDA.
See “Example 2: Creating a New File in a Different Data Representation” on page 724
and “Example 3: Changing the Data Representation of an Existing File” on page 724.
See the OUTREP= option for the LIBNAME statement in SAS DATA Step Statements:
Reference or see the OUTREP= data set option in SAS Data Set Options: Reference.
Examples of Using CEDA
Example 1: Automatically Processing a File
This example shows how simple it is to process a SAS data set in a different operating
environment without any conversion steps.
The data set was originally created on a UNIX environment and later moved to a
Windows PC with a tool like FTP or operating system commands.
Using CEDA, SAS automatically recognizes the file's UNIX data representation and
translates it to the data representation for the Windows environment. The log output
displays a message that the file is being processed using CEDA.
libname Health 'c:\MyFiles';
proc print data=Health.Oxygen;
Examples of Using CEDA 723
run;
Log 34.2 Log Output from Processing a File from a Different Operating Environment
NOTE: Data file HEALTH.OXYGEN.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.
Example 2: Creating a New File in a Different Data Representation
In this example, an administrator who works in a z/OS operating environment wants to
create a SAS file in a UNIX file system directory that can be processed in an AIX UNIX
environment. Specifying OUTREP=RS_6000_AIX_64 as a data set option forces the
data representation to match the data representation of the AIX operating environment
that later processes the file. This method of creating the file can enhance system
performance because the file does not require data conversion later when it is processed
by an AIX computer.
libname MyLib v9 'HFS-file-spec';
data MyLib.a (outrep=RS_6000_AIX_64);
infile file-specifications;
input student $ test1 test2 test3 final;
total = test1+test2+test3+final;
grade = total/4.0;
run;
Example 3: Changing the Data Representation of an Existing File
To change an existing file's data representation, you can use PROC COPY with the
NOCLONE option and specify OUTREP= in the LIBNAME statement. The following
example copies a source library of Windows data sets to a target library of Solaris data
sets. Note that if you move a data set to another platform (for example, with FTP), you
must move it as a binary file.
libname Target 'target-pathname' outrep=solaris_x86_64;
libname Source 'source-pathname';
proc copy in=Source out=Target noclone memtype=data;
run;
For more information, see the OUTREP= option for the LIBNAME statement in SAS
DATA Step Statements: Reference or see the OUTREP= data set option in SAS Data Set
Options: Reference.
724 Chapter 34 Processing Data Using Cross-Environment Data Access (CEDA)

Get SAS 9.4 Language Reference, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.