Using SAS Files |
Characteristics of Compatible Computer Types |
Big endian, little endian, and bi-endian refer to the way an operating system orders integer values. These values are ordered in bytes, and the way in which bytes are ordered is called byte ordering. The ordering of bytes depends on the operating environment on which the integers were produced.
On big endian platforms, the value 1 is stored in binary and is represented here in hexadecimal notation. One byte is stored as 01, two bytes as 00 01, and four bytes as 00 00 00 01. On little endian platforms, the value 1 is stored in one byte as 01 (the same as big endian), in two bytes as 01 00, and in four bytes as 01 00 00 00.
If an integer is negative, the "two's complement" representation is used. The high-order bit of the most significant byte of the integer will be set on. For example, -2 would be represented in one, two, and four bytes on big endian platforms as FE, FF FE, and FF FF FF FE, respectively. On little endian platforms, the representation would be FE, FE FF, and FE FF FF FF. These representations result from the output of the integer binary value -2 expressed in hexadecimal notation.
Different computers store numeric binary data in different forms. Hewlett-Packard and IBM store data in big-endian format. Linux and Tru64 UNIX store data in little-endian format. Solaris SPARC stores data in big-endian format, and Solaris x64 stores data in little-endian format.
Some architectures, including Solaris SPARC V9 and PA-RISC, enable you to compute or pass data from big endian to little endian, or from little endian to big endian. This feature is called bi-endian and refers primarily to how a processor treats data access. A bi-endian platform can improve performance or simplify the logic of networking devices and software. You can use software to switch many bi-endian architectures so that they default to either big-endian or little-endian. For other architectures, the default of big-endian or little-endian is selected by the hardware and cannot be modified by using software.
SAS files can be transported between compatible computer types using various methods including NFS, FTP, and CD. For two computer types to be compatible, they must have the following characteristics in common:
Same word length. Word lengths can be either 32-bit or 64-bit.
Same ordering of bytes in memory. Computer types differ in whether the most significant byte (MSB) or the least significant byte (LSB) is loaded at the lower memory address. This byte order is often referred to as "big endian" or "little endian."
Compatible Computer Types for Release 6.12 through SAS 9.2 |
The tables in this section show the compatible computer types for Release 6.12 through SAS 9.2. After each table, a brief explanation is provided.
Bits | Compatible Computer Types |
---|---|
32 | Intel ABI, Linux, HP-UX, Solaris, AIX, IRIX |
64 | Tru64 UNIX |
You can move a Release 6.12 SAS data set that was created on a 32-bit HP-UX host to a 32-bit AIX host using NFS, FTP, or CD. Because HP-UX and AIX are compatible computer types, you can use the V6 or V6TAPE engine to read the HP-UX data set on the AIX host.
The same 32-bit HP-UX data set can be moved to a 32-bit Intel ABI host. However, because these computer types are incompatible, you cannot use the V6 or V6TAPE engine to read the HP-UX data set.
For information about reading Release 6 data sets, see Reading Version 6 Files.
Bits | Platform | Compatible Computer Types |
---|---|---|
32 | big endian | HP-UX for HP 9000 servers, Solaris for SPARC, AIX, and IRIX |
32 | little endian | Intel ABI, Linux |
64 | big endian | HP-UX for HP 9000 servers, Solaris for SPARC, AIX, and HP-UX for HP Integrity Servers |
64 | little endian | Linux Itanium, Tru64 UNIX, Solaris for x64, Linux x64 |
Note: In Release 8.2, both 32-bit and 64-bit SAS were available for the AIX, HP-UX, and Solaris operating environments. In SAS 9, SAS is 64-bit for these environments.
You can move a Version 8 data set that was created on a 32-bit Solaris host to a 32-bit HP-UX host using methods such as NFS, FTP, or CD. Because this data set was created on compatible computer types, you will be able to read this data set in SAS.
The same 32-bit Solaris data set can be moved to a 64-bit HP-UX host. Because these computer types are incompatible, SAS will use Cross-Environment Data Access (CEDA) to read this data set. For more information, see Reading Version 8 or Later Files from Incompatible Computer Types.
Determining Compatible Computer Types in SAS 9.2 |
In SAS 9.2, the Data Representation field of the PROC CONTENTS output shows the compatible computer types for a SAS file. The following is a portion of the PROC CONTENTS output.
Portion of PROC CONTENTS Output Using the V9 Engine
The CONTENTS Procedure Data Set Name CLASSES.MAJORS Observations 5 Member Type DATA Variables 6 Engine V9 Indexes 0 Created Monday, February 24, 2008 14:30:19 Observation Length 48 Last Modified Monday, February 24, 2008 14:30:19 Deleted Observations 0 Protection Compressed NO Data Set Type Sorted NO Label Second Data Set Data Representation HP_UX_64, RS_6000_AIX_64, SOLARIS_64, HP_IA64 Encoding latin1 Western (ISO)In this example, the Data Representation field shows that the compatible computer types for this data set are: HP-UX 64 bit (HP_UX_64 ), AIX 64-bit (RS_6000_AIX_64 ), Solaris 64-bit (SOLARIS_64 ), and HP-UX Itanium 64-bit (HP_IA64 ). You can use NFS, FTP, or CD to move any data set to any computer and SAS will load the data set. If one data set has the same data representation, then SAS can read the data set natively. Otherwise, SAS must use CEDA. For more information about CEDA, see Reading Version 8 or Later Files from Incompatible Computer Types.
In SAS 9.2, you can use the Solaris x64 platform. In this case, the Data Representation field shows the following compatible computer types: SOLARIS_X86_64, LINUX_X86_64, ALPHA_TRU64, and LINUX_IA64.
The following table lists the possible values for the Data Representation field for SAS 9.2 and the corresponding computer types.
Data Representation Value | Corresponding Computer Type |
---|---|
HP_UX_64 | HP-UX PA-RISC 64-bit |
HP_IA64 | HP-UX Itanium processor family |
LINUX | Linux on Intel 32-bit hardware |
LINUX _X86_X64 | Linux on 64-bit hardware |
RS_6000_AIX_64 | AIX 64-bit |
SOLARIS_X64 | Solaris for x64_x86 |
SOLARIS_64 | Solaris 64-bit on SPARC |
Note: The Encoding value might affect your ability to move SAS files between compatible computer types. It is important to note this value when you are transporting SAS files between hosts. For more information about encoding, see SAS National Language Support (NLS): Reference Guide.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.