Available Options  with the SET command
Previous Topic  Next Topic 

The following options are available for use with the SET command.  Case does not matter when they are entered.

Most of these options have already been discussed in the sections on the various Options dialog boxes.  Click on the headings below to go to these discussions.

The options marked with asterisks (**)  are discussed after the list of available options.

SET Command Options

General Options


Write new, numeric variable names


Preserve variable label tags and grouping where possible

SAMP-SEED   (Auto/Value)

Seed for sampling functions

VAR-CASE-CI  (lower/preserve-mixed/preserve-always/ upper)

Variable case conversion rule for case-insensitive output file

VAR-CASE-CS  (lower/ preserve-mixed/ preserve-always/upper)

Variable case conversion rule for case-sensitive output file

WRITE-OLD-VER   (Y/N) or (Number/N**

Write older versions of output file

DROP-KEEP   (Clear/Save) **

Reset variable selection statement


Set byte order for output SPSS and S-PLUS files

Preserve the input widths of string variables if possible

Preserve the input widths of string variables if possible

User Missing Values

USER-MISS   (All/First/None)

Honor user-missing values


Map user missing value to extended missing values


Map user missing using the first letter of the variable label, if possible

Date/Time Formats  - Reading

DATE-FMT-READ    (Format string)

Format for reading dates from ASCII files

TIME-FMT-READ    (Format string)

Format for reading times from ASCII files

DATETIME-FMT-READ    (Format string)

Format for reading date/time from ASCII files

DATE-SCAN-FMT    (Format string)

Format for scanning ASCII files for dates and times


Century cutoff for two digit years, defaults to 20

Date/Time Formats - Writing

DATE-FMT-WRITE    (Format string)

Format for writing dates in ASCII files

TIME-FMT-WRITE   (Format string)

Format for writing times in ASCII files

DATETIME-FMT-WRITE   (Format string)

Format for writing date/time in ASCII files

Encoding Options

IN-ENCODING (System/Other) 

Translate from this encoding when reading files


OUT-ENCODING (System/Other)

Translate from this encoding when writing files

If you choose to override the default behavior, you can choose a different encoding by going to the user interface, clicking on the Options tab and selecting Encoding Options.  First select the Region and then the Character Set.  The value in parentheses after the name of the character set is the value you should enter for 'Other'.  Be sure to read the section Encoding Options.

ODBC Options

Use nulls for missing strings

When possible, use larger datetime type

ODBC-DATE-ROWS-TO-READ   (10/Number/All)
Number of rows to read to determine the type of date variable

Use varchar if it has the same length as char


Append to Access or ODBC database tables

ASCII Options-Reading

DELIMITER-RD   (Autosense/Comma/Tab/Space/Semicolon/Other)

Delimiter for reading ASCII files, Other is any character, such as '|'

COMBINE-DELIMITERS   (Off/Spaces only/Spaces+Tabs)

Combine adjacent delimiters when reading space delimited files

ASCII-RD-VNAMES  (Autosense/First-row/Make-up)

Field names when reading ASCII files


Read variable labels from row following variable names

SKIP-ROWS (0/Number)

Number of rows to skip at the top of the file

NUM-MISS-RD   (Missing value characters/Extended/None)

Numeric missing value when reading ASCII files

QUOTE-CHAR-RD   (Character/None)

Quote character used when reading ASCII files, defaults to “

MAX-LINES   (Number/All)

Maximum ASCII lines to examine for variable type

DECIMAL-POINT   (Character)

Decimal point for reading ASCII files, defaults to ‘.’

THOUSANDS-SEP   (Character)

Thousands separator for reading ASCII files, defaults to ‘,’

ASCII Options-Write

DELIMITER-WR   (Comma/Tab/Space/Semicolon)

Delimiter for writing ASCII files, Other is any character, such as '|'

QUOTE-CHAR-WR   (Character/None)

Quote character used when writing ASCII files, defaults to “

NUM-MISS-WR   (Missing value characters/Extended/None)

Numeric missing value when writing ASCII files

SET LINE-END    (Win, Unix)

Line endings for either Windows style or Unix style files


Write field names to ASCII files


Omit paths from generated program files


Preserve input variable widths in output programs


Write variable numbers in schemas for delimited files

SAS Reading


Read value labels

READ-FMT-NAME    (Filespec)     

Name of SAS value label catalog or data file

(See below **)

UDF-CAT-MEMBER    (catalogname)

Name of the catalog in the CPORT file to be used for reading formats

(See below **)

UDF-DAT-MEMBER    (datasetname)

Name of the dataset in a CPORT or Transport file to be used for reading formats

(See below **)


Continue processing if no format file is found


Ignore errors in processing SAS catalog

** The various choices for reading SAS value labels are discussed in the section SAS Value Label Options.  The following SET command sequences correspond to these choices.

Do not read formats


Read directly from a catalog file


SET READ-FMT-NAME filename.sas7bcat    (the extension indicates a catalog file)

Read from a catalog in a CPORT library


SET READ-FMT-NAME filename.stc

(the extension indicates a CPORT library)

SET UDF-CAT-MEMBER catalogname

Read from a SAS datafile 


SET READ-FMT-NAME filename.sas7bdat

(the extension indicates a data file)

Read from a dataset in a CPORT library


SET READ-FMT-NAME filename.stc

(the extension indicates a CPORT library)

SET UDF-DAT-MEMBER datasetname

Read from a SAS Transport file 


SET READ-FMT-NAME filename.tpt

(the extension indicates a Transport file)

SET UDF-DAT-MEMBER datasetname


Read Extended Attributes

SAS-ATTR-NAME (filename and path/%ipath%/%iname%.sas7bxat)

The name of the SAS attribute file

SAS Writing


Write Proc Format program for SAS

WRITE-FMT-NAME    (Filespec)

File name for Proc Format program


Write a value labels into a SAS catalog file


The SAS format used for date variables


The SAS format used for time variables


The SAS format used for DateTime variables

Worksheet Options

WKS-NAME-ROW (Autosense/1st-row/No-name/Num)

Reading of worksheet variable names

WKS-DATA-RANGE   (Autosense/Name/Coordinates)

Specifying a data range as input


Read variable labels from the row following the variable names

WKS-BLANK-ROWS   (Stop/Skip/Use)

Treatment of worksheet null rows


Concatenate worksheet pages into a single output file

WKS-NA-STRING     (string)

Indicate a string to be considered numeric missing when reading worksheets


Transfer blank columns from worksheets


Write a field name row in worksheet output


Write variable labels in the second row of worksheets.


Write value labels instead of numbers to Excel.

JMP Options


Write value labels into JMP files


Append custom properties to variable labels when reading JMP files

R and S-Plus Options


Convert factors to strings (Y) or leave as numerical variables with labeled values (N)


Write Version One missing strings

RATS Options

RATS-DATE-VAR (First, Specified, None)

The variable in the input file that specifies the series start and frequency in RATS output

RATS-DATE-VAR-NAME (Variable name)

If rats-date-var is set to "specified" , the variable name should be set with this option

RATS-VAR-DATE-FREQ (Autosense, Daily, Weekly, Monthly, Quarterly, Annual)

This option will be applied if rats-date-var is set to "specified" or "first"


This will be used if "rats-date-var" is set to “none”

RATS-DATE-FREQ  (Daily, Weekly, Monthly, Quarterly, Annual)

This is applied if "rats-date-var" is set to none)

Output Options

SAS-OUTREP                              (Alpha_True64 / Alpha_Vms_32 /

                                              Alpha_Vms_64 / Alpha_Ia64 /

                                                 Hp_Ux_32 / Hp_Ux_64 /

                                                 Intel_Abi / Linux_32 / Mips_Abi /

                                                 Os2 / Rs_6000_Aix_32 /

                                                 Rs_6000_Aix_64 / Solaris_32 /

                                                 Solaris_64 /  Windows_32 /


SAS data representation


Write Matlab Date/Time values as strings


Concatenate Statistica 7+ value labels and descriptions

DDI-AGENCY (example.org)

Agency name/url written into DDI Schema files


Adjust the limit on the number of output variables for Stata SE/MP.


Strings longer than the value given in this option will be written as strls rather than Stata strings.

Output Options(2)

GRETL-ROW-LABEL-VAR (first/none/specify)

This variable will be used as the row label when writing gretl files.

GRETL-ROW-LABEL-NAME (name of string or date variable)

If gretl-row-label-var is set to specify, this option specifies the name of the variable.  It is case sensitive.

SET Options Used Only in Command Processor

Controlling the  Version of Output Files

   WRITE-OLD-VER      (Y/N) or (Number/N)

   WRITE-VER (Number)

By default, except for Stata, a particular output file type will be written using the latest version supported by Stat/Transfer.  For example SAS Version 9 files will be written if SAS is specified.

If Stata is specified as the output file type, Stata Version 15 files will be written by default.  Users of Stata Version 13 and older may see an error message, "File is not in Stata format" generated when Stata sees the newer file type.  If you see this, simply select an older format and repeat your transfer.

To write a file for a previous version of a particular file type, use either of the SET commands:



where Number is the version number of the output file that you wish to use.  The number will be useful if you wish to precisely control the version of SPSS or Stata files.

If you use the first form of the SET command, Stat/Transfer will use the next-to-the-last version of the output file type you have selected.  For example, if you have selected a SAS output file,

  set write-old-ver y

would tell Stat/Transfer to write a SAS Version 8 output file.

If you wished to create a Stata 5 output file, you would use

  set write-ver 5

Note that you can use either form if you wish to use the next-to-the-last version.

Reset Variable Selection Statement

     DROP-KEEP       (Clear/Save)  

If data are transferred from more than one input file during a single session, then you need to specify the variables that are to be transferred from each file, using the KEEP or DROP variable selection command. The DROP-KEEP options of the SET command allow you to reuse or clear the variable selection command.

Input Files Specified Separately

If the input files are specified with separate COPY commands (that is, without using wildcards), then the default behavior is that you must give a separate KEEP or DROP variable selection statement before each COPY command.  This corresponds to the option 'Clear' for DROP-KEEP.

However, if the same variables are to be transferred from each file, you can specify that the same KEEP or DROP command apply to all input files that follow, until another KEEP or DROP command is encountered.  To do so use the SET command

   set drop-keep save

Input Files Specified with Wildcards

If the input files are specified with wildcards, then the default behavior is that the KEEP or DROP variable selection command you give before a COPY command applies to all of the files specified in that command. Thus the default when files are specified with wildcards is 'Save'.

If you set the DROP-KEEP option to 'Clear', then the variable selection statement will apply only to the first file.  All of the other files given by the wildcard specification will transfer all of their variables.

Note that the default changes depending on whether or not the input file specification contains wildcards.  The default is 'Clear' for no wildcards and 'Save' for wildcards.

Set Byte Order for S-PLUS and SPSS Output Files

   BYTE-ORDER       (HL/LH)

By default, under Windows Stat/Transfer will write files in low-high byte order for S-PLUS and SPSS output files.  Unix machines vary in their byte order.   DEC Alpha and Intel processors are low-high byte order, other Unix machines are high-low.  You can change the default in order to write a file appropriate for a Unix machine with the second byte order.

For example, if you wish to produce an S-PLUS file suitable for a Sun machine, you would use the SET command

   set byte-order hl