Previous Page | Next Page

Cross-Environment Data Access (CEDA)

Identifying the Format of a SAS File


Example: Reporting That CEDA Is Being Used

In SAS 9 and later, SAS writes a message to the log when CEDA is used. Here is an example:

NOTE: Data file HEALTH.GRADES.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:   Additional resources are consumed each time you read a foreign file.   [cautionend]


Example: Identifying a File's Format Using PROC CONTENTS

You can use the CONTENTS procedure (or the CONTENTS statement in PROC DATASETS) to find out the format of the specified SAS file.

Here is an example of the code:

proc contents data=grades;
run;

An excerpt of the output follows:

Data Representation  HP_UX_64, RS_6000_AIX_64, SOLARIS_64, HP_IA64

In the preceding example, the output shows that the file is represented in UNIX format.

If the target computer uses a format that is the same as the file format, then you can read, write, and update the file.

Note:   No additional resources are consumed.  [cautionend]

If the target computer uses a format that is different from the file format (in this example, UNIX), you can read and write, but you cannot update the files.

Note:   Additional resources are consumed each time you read a foreign file.   [cautionend]


Restrictions on Accessing a Foreign File

You cannot update a foreign file. However, you can do the following:

If you try to update a SAS file that has a format that is foreign to the accessing computer, an error message is displayed.

Note:   The type of access that CEDA is permitted depends on the engine used and the type of file access requested (read, write, update). For more information about file access limitations, see When Is CEDA Supported? .  [cautionend]

A typical error message follows:
ERROR: File TEST.CMVS cannot be updated because its 
encoding does not match the session encoding or the file is in a 
format native to another host, such as SOLARIS, HP_UX, RS_6000_AIX, 
MIPS_ABI.

Previous Page | Next Page | Top of Page