ASCII File - Write Options
Previous Topic  Next Topic 

ASCII/Text Files


Delimiter

The Delimiter option will give you a list of possible delimiters for output ASCII files.  You can choose a delimiter from the list: commas, tabs, spaces, and semicolons, or if you have a delimiter that is not on the list, click on 'Other" and enter the delimiter you wish to use.  The default is a comma.


String Quote Character

The character specified here will be written before and after string variables on output.  It is typically a double quote. This character is only strictly necessary if your fields have an embedded delimiter.  If you enter a blank here, string fields will not be enclosed by any character.


Numeric Missing Value

It is possible to specify the string that will be used to represent missing values when Stat/Transfer writes ASCII files.  For example, you may want to create an output file for a program that expects a specific missing value, such as a period for SAS.


If you want to write a string other than the default blank to represent missing values in the output data set, then enter that string in the Numeric Missing Value field.


If you wish to write extended missing values for either delimited or fixed ASCII files, use the option below or enter the work "extended".


Write extended (a-z) missing values

If this option is checked, the keyword 'extended' will be entered into the Numeric Missing Value field.  When 'extended' is entered, extended missing values ('.a' - '.z', '.', and '._')  in either delimited or fixed ASCII files will be written to either delimited or fixed format ASCII files.


Line Endings

The line endings of ASCII files for Windows differ from those for Unix or OS-X.  Windows files have a carriage return and a line feed at the end of each line, while Unix and Mac files have only a line feed.  If you wish to write an output file for use on a Unix machine or a Mac, then you must tell Stat/Transfer to write the correct kind of line ending.


The default is 'Windows'.  To write Unix and Mac files, select 'Unix & OS-X' from the drop-down menu.


Write variable names in first row

The option Write Variable Names in First Row is on by default.  If you turn it off, field names will not be written in the first row of delimited ASCII output files.


Generated Programs and Schemas


Write complete paths
This option is used when generating programs to accompany fixed format ASCII files. When Write complete paths is checked, the complete path specification will be written into the programs for the output types "SAS Program + Data File", "SPSS Program + Data File" and "Stata Program + Data File". This option is checked by default.

The option Write complete paths is useful if you are going to read in the program and accompanying ASCII data on your own machine.

However, if you are going to store your data and program archivally or send it to another user, it is best to leave this option unchecked. In this case, only the default directory '.' and the file name are written. In this case, the program can be more easily moved to another machine, since it can be executed by setting the default directory rather than editing the program.

Shorten names and labels for older versions
If this option is left unchecked (the default) programs will be written for the latest version of SAS, SPSS and Stata, using the longest possible variable names and labels.

On the other hand, if the option Shorten names and labels for older versions is checked, variable names will be truncated to a width of eight characters, if necessary, and labels will be suitable for older versions of the software. Use this option if you want to maximize compatibility.

Preserve Input Widths
By default, Stat/Transfer will optimize your data and write fixed format ASCII data into the narrowest width that is possible. Stat/Transfer also formats ASCII data using a format in which the decimal point is allowed to float.

In some cases, particularly for SPSS files that were originally created from fixed format ASCII data or for fixed format data read with a Stat/Transfer Schema, the input file will contain enough information to skip this optimization step and write out a file that has the same widths as the data that were originally input to SPSS. If this is the case for your data and you want fixed decimals and the original widths, check this option.

Note that for most other file formats, this option will result in incorrect output. You should check your results and use this option at your own risk.