In SAS under Windows, character values are sorted using the
ASCII collating sequence. As an alternative to the numeric dummy variables discussed previously, you can
choose a character variable with a length of 1 byte to serve the same purpose.
The maximum number of
variables is limited by the first encountered limitation:
-
-
the total storage possible for
names, labels, and metadata
-
the amount of available
memory on the machine where the data set is stored.
You can define a data
set with an observation length of up to 2GB on a 32-bit platform and
approximately 2*46 bytes on a 64-bit platform. The observation length
cannot exceed the value of the BUFSIZE option.
Assuming a single-byte
character set, and assuming that you use the maximum 352 bytes that
are possible for name, label, and other data for each variable, you
can have a maximum of about 4,050,000 variables. If the names, labels,
and format names are shorter, you can have more than 200,000,000.
There is aA maximum of 1GB is required to store all the variable names
and other metadata (data set label, compression name, and other data).
The 352-byte maximum is the result of adding 32 bytes each for formats,
informats, and variable names to the 256 bytes for label values.
Assuming that the above
limits are not exceeded, the maximum possible number of variables
is 2GB on 64-bit hosts.