Regressing SAS Data Sets to SAS 6 Format

The UPLOAD and DOWNLOAD procedures in SAS/CONNECT and PROC COPY with the XPORT engine are the only strategies available for regressing a data set to SAS 6.
Note: SAS/CONNECT requires a separate license.
The support of long variable names, long variable labels, and long data set labels in SAS 9 and SAS 8 can make SAS 9 and SAS 8 data sets incompatible with SAS 6 data sets. In order to revert back to SAS 6, these long names must be truncated to a length that is supported in SAS 6. Here are the truncation rules:
SAS 9 and SAS 8 Data Set Object Names to Regress
Number of Characters for SAS 6
Data set labels
40
Variable labels
40
Variable names
8
In order to transport SAS 9 and SAS 8 files back to SAS 6, set the portable VALIDVARNAME system option to the value V6 in the SAS session in which you are transporting the file. Here are examples, which are specified in the form of a SAS system option and a macro variable:
options VALIDVARNAME=V6
%let VALIDVARNAME=V6;
For details about setting the VALIDVARNAME system option, see in SAS System Options: Reference.
The truncation algorithm that is used to produce the eight-character variable name also resolves conflicting names:
  • The first name that is greater than eight characters is truncated to eight characters. A truncation from PROPERTYTAXRATE to PROPERTY is the first truncation.
  • The next name that is greater 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. For example, PROPERTYTAXRATE is truncated to PROPERT2.
  • The suffix is increased by 1 for each truncated name that conflicts with an existing name. If the suffix reaches 9, the next conflicting variable name is truncated to 6 characters, and a suffix of 10 is appended. For example, PROPERTYTAXRATE is truncated to PROPER10.
The VALIDVARNAME option solves the long variable name truncation problem. However, there are no techniques for regressing these SAS 9 or SAS 8 features to SAS 6:
  • data set names that exceed eight characters
  • integrity constraints
  • data set generations
  • audit trail
The solution to regressing data sets that have these features is to re-create the data sets without the SAS 9 or SAS 8 features in a SAS 9 or SAS 8 session.
Note: SAS/CONNECT does support uploading or downloading some catalog entries from SAS 9 or 8 to SAS 6. For details, see UPLOAD Procedure in SAS/CONNECT User's Guide and DOWNLOAD Procedure in SAS/CONNECT User's Guide.