Examples of Using CEDA


Example 1: Automatically Processing a Foreign File

This example shows how simple it is to move a SAS data set from one operating environment to another and to process the file in the new environment without any conversion steps.

First, the SAS data set is moved, using FTP, from an HP UNIX environment to a Windows PC.

 C:\>ftp my.unix.node.com  FTP>binary  FTP>get unxdata.sas7bdat  FTP>quit 

Then, using CEDA, SAS automatically recognizes the foreign data representation (which is HP UNIX) and translates it to the native data representation for the Windows environment. Because the SAS system option MSGLEVEL=I is specified, the log output displays a message that the file is being processed using CEDA.

 options msglevel=i;  libname unx '.';  proc print data=unx.unxdata;  run; 
Output 34.2: Log Output from Processing a Foreign File
start example

INFO: Data file UNX.UNXDATA is in a format native to another host or the file encoding which does not match the session encoding. Cross Environment Data Access will be used, which may require additional CPU resources and may reduce performance.

end example
 

Example 2: Creating a New File in a Foreign Environment

In this example, an administrator who works in a z/OS operating environment wants to create a file on an HFS system so that the file can be processed in an HP UNIX environment. Specifying OUTREP=HP_UX_32 as a data set option forces the data representation to match the data representation of the UNIX operating environment that will process the file. This method of creating the file can enhance system performance because the file does not require data conversion when being read by an HP UNIX machine.

 libname foreign v9 '  HFS-file-spec'  ;  data foreign.a (outrep=HP_UX_32);     infile  file-specifications  ;     input student $ test1 test2 test3 final;     total = test1+test2+test3+final;     grade = total/4.0;  run; 



SAS 9.1 Language Reference. Concepts
SAS 9.1 Language Reference Concepts
ISBN: 1590471989
EAN: 2147483647
Year: 2004
Pages: 255

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net