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
|
Truncation Length (in
characters)
|
|
|
|
|
|
|
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
|
|
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.
|