To extend the observation
count in an output SAS data file, use the EXTENDOBSCOUNTER= option.
The use of this option requests an enhanced file format that counts
observations beyond the 32-bit long maximum. By specifying the option
when the file is created, the resulting 32-bit file behaves like a
64-bit file regarding counters.
By default, the EXTENDOBSCOUNTER=
functionality is set to NO. This setting specifies that the maximum
observation count is determined by the long integer size for the operating
environment. To extend the observation count, specify EXTENDOBSCOUNTER=YES
as either a SAS data set option or a LIBNAME statement option.
-
As a SAS data set option, EXTENDOBSCOUNTER=YES
causes the newly created output file to be created with an extended
observation count.
-
As a LIBNAME statement option,
EXTENDOBSCOUNTER=YES causes newly created output files in the SAS
library to be created with an extended observation count.
For example, when processed
in an operating environment with a 32-bit long integer, the following
code creates an output SAS data file that extends the observation
count beyond the 32-bit long maximum. The EXTENDOBSCOUNTER= option
is specified as a data set option in the DATA statement. This change
requests the enhanced file format for the individual file:
libname myfiles 'C:\MyFiles';
data myfiles.bigfile (extendobscounter=yes);
.
.
.
run;
Specifying EXTENDOBSCOUNTER=
as a LIBNAME statement option requests the enhanced file format for
all files created for the SAS library. The following code uses the
COPY procedure to recreate all of the files in the SAS library with
the extended observation count:
libname new 'C:\NewFiles' extendobscounter=yes;
libname old 'C:\OldFiles';
proc copy in=old out=new;
run;
Tip
Specifying the EXTENDOBSCOUNTER=
option in a LIBNAME statement is also useful to migrate a library
with the MIGRATE procedure, which does not support SAS data set options.