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
NUMERIC-NAMES (Y/N)
Write new, numeric variable names
PRESERVE-LABEL-SETS (Y/N)
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
BYTE-ORDER (HL/LH) **
Set byte order for output SPSS and S-PLUS files
USER-MISS (All/First/None)
Honor user-missing values
MAP-USER-MISS (Y/N)
Map user missing value to extended missing values
MAP-MISS-WITH-LABS (Y/N)
Map user missing using the first letter of the variable label, if possible
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 (Value)
Century cutoff for two digit years, defaults to 20
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
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-NULL-STRINGS (Y/N)
Use nulls for missing strings
ODBC-USE-DATETIME (Y/N)
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
ODBC-VARCHAR-OVER-CHAR (Y/N)
Use varchar if it has the same length as char
DB-TABLE-APPEND (Y/N)
Append to Access or ODBC database tables
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
ASCII-VAR-LABS-2ND-ROW (Y/N)
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 ,
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 (Y/N)
Write field names to ASCII files
CODE-OMIT-PATHS (Y/N)
Omit paths from generated program files
PROG-PRESERVE-WIDTHS (Y/N)
Preserve input variable widths in output programs
READ-SAS-FMTS (Y/N)
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 **)
CAT-ABSENCE-OK (Y/N)
Continue processing if no format file is found
CAT-ERROR-OK (Y/N)
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 |
SET READ-SAS-FMTS N |
|
Read directly from a catalog file |
SET READ-SAS-FMTS Y SET READ-FMT-NAME filename.sas7bcat (the extension indicates a catalog file) |
|
|
Read from a catalog in a CPORT library |
SET READ-SAS-FMTS Y SET READ-FMT-NAME filename.stc (the extension indicates a CPORT library) SET UDF-CAT-MEMBER catalogname |
|
|
Read from a SAS datafile |
SET READ-SAS-FMTS Y SET READ-FMT-NAME filename.sas7bdat (the extension indicates a data file) |
|
|
Read from a dataset in a CPORT library |
SET READ-SAS-FMTS Y 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-SAS-FMTS Y SET READ-FMT-NAME filename.tpt (the extension indicates a Transport file) SET UDF-DAT-MEMBER datasetname |
WRITE-SAS-FMTS (Y/N)
Write Proc Format program for SAS
WRITE-FMT-NAME (Filespec)
File name for Proc Format program
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
WKS-VAR-LABS-2ND-ROW (Y/N)
Read variable labels from the row following the variable names
WKS-BLANK-ROWS (Stop/Skip/Use)
Treatment of worksheet null rows
CONCATENATE-PAGES (Y/N)
Concatenate worksheet pages into a single output file
WKS-NA-STRING (string)
Indicate a string to be considered numeric missing when reading worksheets
WKS-WRITE-VNAMES (Y/N)
Write a field name row in worksheet output
JMP-LABELS (Y/N)
Write value labels into JMP files
JMP-CUST-PROPERTIES (Y/N)
Append custom properties to variable labels when reading JMP files
FACTOR-AS-STRING (Y/N)
Convert factors to strings (Y) or leave as numerical variables with labeled values (N)
R-OLD-NA (Y/N)
Write Version One missing strings
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"
RATS-START-DATE (Date in DD/MM/YYYY format)
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)
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 /
Windows_64)
SAS data representation
MLAB-DATETIME-AS-STRING (Y/N)
Write Matlab Date/Time values as strings
STAT7-VLAB-DESCRIP (Y/N)
Concatenate Statistica 7+ value labels and descriptions
DDI-AGENCY (example.org)
Agency name/url written into DDI Schema files
SET Options Used Only in Command Processor
Write Older Version of Output File
WRITE-OLD-VER (Y/N) or (Number/N)
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 11 files will be written by default. If Stata Version 12 files were to be written, then users of older versions of Stata would see an error message, "File is not in Stata format" generated when Stata sees the newer file type. The default Stata Version 11 files can be read by all Stata versions.
To write a file for a previous version of a particular file type, use either of the SET commands:
SET WRITE-OLD-VER Y|N
SET WRITE-OLD-VER Number
where Number is the version number of the output file that you wish to use.
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-old-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