The following figure illustrates native and interface SAS data files and their relationship
to SAS views.
Figure 26.1 Types of SAS Data Sets
SAS Data Views
(contain descriptor
information that points to
data stored elsewhere)
SAS Data Files
(contain data and
descriptor information)
Native Data Files
(formatted by SAS)
Interface Data Files
(formatted by other
software)
Native Data Views
(formatted by SAS)
Interface Data Views
(formatted by other
software)
PROC SQL Views DATA Step Views
SAS Data Sets
Understanding the Observation Count in a SAS
Data File
Definition of the Observation Count
The observation count in a SAS data file is the total number of observations (rows) that
are currently in the file combined with the number of deleted observations. The
observation count is a file attribute that you can list for a specific SAS data file by
executing the CONTENTS procedure or the CONTENTS statement in the DATASETS
procedure. In the procedure output, the observation count is the sum of the values in the
Observations and Deleted Observations fields. Knowing the observation count is
beneficial for managing file size and estimating disk space requirements. In addition,
there is a maximum number of observations that can be counted for a SAS data file,
which is determined by the long integer size for the operating environment.
Maximum Observation Count
The maximum number of observations that can be counted for a SAS data file is
determined by the long integer data type size for the operating environment.
In operating environments with a 32-bit long integer, the maximum number is 2
31
-1
or approximately two billion observations (2,147,483,647).
In operating environments with a 64-bit long integer, the maximum number is 2
63
-1
or approximately 9.2 quintillion observations.
608 Chapter 26 SAS Data Files
It is unlikely that a SAS data file in an operating environment with a 64-bit long integer
will reach the maximum observation count. However, for operating environments with a
32-bit long integer, reaching the maximum observation count of approximately two
billion observations is not unusual.
The SAS 9.4 operating environments whose internal data representation store the
observation count as a 32-bit long integer include the following platforms:
Microsoft Windows on 32-bit platform.
Microsoft Windows 64-bit Edition. In this 64-bit operating environment, the long
integer data type uses the 32-bit model to maintain compatibility with 32-bit
applications.
z/OS on 32-bit platform.
SAS Processing When the Maximum Observation Count Is Reached
When a SAS data file reaches the maximum observation count, continued SAS
processing depends on whether the file has an index or an integrity constraint that uses
an index.
If the SAS data file has an index or an integrity constraint that uses an index (unique
key, primary key, and foreign key), an error message is issued when an operation
reaches the maximum observation count. For example:
ERROR: File MYFILES.BIGFILE contains 2G -1 observations and cannot
hold more because it contains an index or an Integrity Constraint
that uses an index.
For SAS 9, a SAS data file is never damaged when an operation attempts to exceed
the maximum observation count. However, you must take explicit action to continue
processing the file.
If the SAS data file does not have an index or an integrity constraint that uses an
index, sequential processing continues and additional observations are accepted.
However, the file cannot store the observation count and does not maintain the
observation numbers. Any operation that requires an observation number is not
available. There are no messages to indicate that the file has reached or exceeded the
maximum observation count.
The following list describes some of the operations and features that are limited for a
SAS data file that exceeds the maximum observation count and does not have an
index or an integrity constraint that uses an index. For a complete list, contact SAS
Technical Support.
SAS procedures that return an observation count (such as the PRINT procedure
or the CONTENTS procedure) return a missing value, which is represented by a
period (.), for the number of observations.
SAS procedures that depend on the observation count (for example, the SORT
procedure or the COMPARE procedure) can return unpredictable results.
Operations that update the observation count cannot be submitted. You cannot
reset the observation count by deleting observations.
When you request to compress a file for which the observation count is no longer
maintained, the compression percentage cannot be calculated.
You cannot create an index or an integrity constraint.
Understanding the Observation Count in a SAS Data File 609
For CEDA processing between operating environments, the following behavior
occurs. Note that SAS 9.3 and after provides improved CEDA processing
between operating environments:
Table 26.1 CEDA Processing between Operating Environments
Operating
Environment Operation
Behavior Before
SAS 9.3 Current Behavior
32-bit long integer
operating
environment
Open a 64-bit long
integer file that
exceeds the 32-bit
maximum.
Open fails. Opens the file due to
improved 32-bit
counters.
32-bit long integer
operating
environment
Create a 64-bit long
integer file that
exceeds the 32-bit
maximum.
Output processing
stops.
Creates the file due
to improved 32-bit
counters.
64-bit long integer
operating
environment
Open a 32-bit long
integer file that
exceeds the 32-bit
maximum.
Open fails. Opens the file with
limited functionality,
because the
observation number
is not available.
64-bit long integer
operating
environment
Create a 32-bit long
integer file that
exceeds the 32-bit
maximum.
Output processing
stops. File is not
created.
Creates the file up to
the 32-bit
maximum.
Recovering from an Exceeded Maximum Observation Count
If a SAS data file has reached or exceeded the maximum number of observations that
can be counted and the file has an index or an integrity constraint that uses an index,
then you must take explicit action to continue processing.
You can delete the index or the integrity constraint and continue processing.
However, because the file exceeds the maximum observation count, you have limited
functionality. You can use the DATASETS procedure or the SQL procedure to delete
indexes and integrity constraints. See the Base SAS Procedures Guide.
If you want to retain your index or integrity constraint, you must re-create the SAS
data file. Starting in SAS 9.4, the file is created with an extended observation count
by default when you create a SAS data file. See “Extending the Observation Count
for a 32-Bit SAS Data File” on page 662.
If a SAS data file has reached or exceeded the maximum number of observations that
can be counted and the file does not have an index or an integrity constraint that uses an
index, there are no messages to indicate that the file has reached or exceeded the
maximum observation count. However, the file has limited functionality. To regain
functionality, you can re-create the SAS data file with an extended observation count.
See “Extending the Observation Count for a 32-Bit SAS Data File” on page 662.
610 Chapter 26 SAS Data Files
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.151.32