Translation of SAS Data between Computers That Represent Data Differently

Overview of Data Translation between Computers

SAS/CONNECT clients and servers can access SAS data and programs from each other, despite differences in how data is represented on computers that the client and server SAS sessions run on. For example, a SAS/CONNECT client that runs on a PC can download a SAS data set from a mainframe for processing in the client session.
Numeric data (floating-point representation) and character data are dynamically translated in each client/server transfer, bypassing the explicit creation of an intermediate transport file, without the user's knowledge of the underlying translation activities.

Remote Library Services

Remote Library Services (RLS) performs dynamic data translation. SAS/CONNECT use RLS to access SAS files in remote SAS libraries. SAS/CONNECT clients access remote files by using the LIBNAME statement.
Note: You can also use the CONNECT TO statement in PROC SQL to access remote files.
If the server data is accessed and processed to produce a single result at the client, only one translation occurs: from the representation of the server computer to the representation of the client computer.
If the server data is processed on the client and the results are updated on the server, two translations occur.
  • When the data is accessed from the server, it is translated from the representation of the server computer to the representation of the client computer.
  • When the data is updated (and stored) on the server, it is translated from the representation of the client computer back to the representation of the server computer.
Depending on the characteristics of the data, translation can cause a loss of some degree of numeric precision and magnitude.
The LIBNAME statement can be used to identify the server library to be accessed. Various SAS statements can be used to process the data, specifying the location of the server data and methods of data processing. These examples show that data is read (and translated) from the server and processed, with results being copied to a client location.
libname  serv-libref 'server-library'
server=server-ID;
libname client-libref 'client-library';
proc copy in=serv-libref
out=client-libref;
Note: Using RLS in a SAS/CONNECT session is not the most efficient method to move large quantities of server data. RLS is used here to illustrate the possibility for the loss of precision across computers that represent numeric data differently.
For details about how to access a remote file system, see Remote Library Services (RLS) .

Data Transfer Services

Overview

Data Transfer Services (DTS) performs dynamic data translation. SAS/CONNECT uses DTS to upload and download complete or partial SAS files in a client/server environment.
For an upload, the client sends data to the server for processing. For a download, the client requests the transfer of data from the server to the client for processing.
For more information, see Using Data Transfer Services .
The translation process for transferring data varies according to the SAS release.

Translation of SAS 8 and Later Releases

In SAS 8 and later releases, translation occurs only once for each data transfer between a client and a server that run on computers whose architectures are different from each other. SAS/CONNECT dynamically translates incompatible file formats for each file upload or file download transaction, bypassing the explicit creation of a transport file.
LIBNAME statements are used to identify the server library to be accessed and the client library that the server data is written to. PROC DOWNLOAD reads the data from the server and translates and copies it to a specified client location.
libname client-libref ' client-library';
rsubmit;
   libname serv-libref ' server-library';
   proc download
data=server-libref.data-set 
      out=client-libref.data-set;
endrsubmit;

SAS 6 Translation

In SAS 6, translation occurs twice for each data transfer between a client and a server that run on computers whose architectures are different from each other.
  1. The data is translated from the source computer's native format to transport format.
  2. The data that is represented in transport format is translated to the target computer's native format.
LIBNAME statements are used to identify the server library to be accessed and the client library that the server data is written to. PROC DOWNLOAD translates the data from the server into transport format, which is next translated to the client computer format when copied to a specified client location.
libname client-libref ' client-library';
rsubmit;
   libname serv-libref ' server-library';
   proc download
data=server-libref.data-set 
      out=client-libref.data-set;
endrsubmit;