Features Exclusive to SAS Releases after SAS 6

New Features Incompatible with SAS 6

These new features in SAS cannot be modified to make SAS files compatible with SAS 6:
  • generation data sets
  • integrity constraints
Any attempt to access SAS files that contain these features will fail. For complete details about new features, see SAS Language Reference: Concepts.

SAS File Format Features

The file format features of newer SAS releases and SAS 6 are incompatible. Here are the file format features of the newer releases:
  • long data set labels
  • long variable labels
  • long variable names
However, in order to maintain the ability to transfer data sets between the newer and older SAS releases, SAS/CONNECT applies truncation rules to data set attributes. Truncation enables you to take advantage of the features of the newer SAS releases while continuing to access SAS 6 files in a mixed-version environment.

File Transfer Services: Truncating Long Names and Labels

The newer SAS releases support longer names and labels than the maximum length supported in SAS 6. The longer names and labels are stored in SAS 8 (or later) data sets, which make those data sets incompatible with SAS 6 data sets. SAS/CONNECT implements a set of truncation rules to convert data sets that contain long names and labels into SAS 6 data sets.
The UPLOAD or DOWNLOAD procedures apply the truncation rules when performing these types of transfers of SAS files
  • from a SAS 8 (or later) SAS session to a SAS 6 SAS session
  • between two sessions (each running SAS 8 or later) to produce a SAS 6 data set.
    Note: To produce a SAS 6 data set explicitly, specify VALIDVARNAME=V6 in the SAS session that the data set is created in. A setting of VALIDVARNAME=V6 overrides any other engine specification in the SAS session, causing truncation to be applied to long names.
SAS/CONNECT applies the following truncation rules to data sets that have long data set labels, long variable labels, or long variable names. In each case, the length is truncated to the maximum length that is supported in SAS 6.
SAS 6 Truncation Lengths
Label or Name
Truncation Length (in characters)
Data set label
Variable label
Variable name
Note: If the variable label field is empty, the long variable name is copied to the label field.
The truncation algorithm that is used to produce the 8-character variable name also resolves conflicting variable names. Here are some additional truncation rules:
Truncation Rules to Resolve Conflicting Variable Names
Truncation Rule
The first name that has more than eight characters is truncated to eight characters.
STOCKNUMBER53 is truncated to STOCKNUM.
The next name that has more than eight characters is truncated to eight characters. If it conflicts with an existing variable name, it is truncated to seven characters, and a suffix of 2 is added.
STOCKNUMBER54 is truncated to STOCKNU2.
The suffix is increased by one for each truncated name that results in a conflict. If the suffix reaches 9, the next conflicting variable name is truncated to 6 characters, and a suffix of 10 is added.
STOCKNUMBER63 is truncated to STOCKN10.