ASCII Files - Delimited
Previous Topic  Next Topic 

Stat/Transfer will read and write delimited ASCII.  Note that as of version 10, "ASCII" is used as a shorthand, since Stat/Transfer supports a variety of character sets besides ASCII.  If you need to read or write data  in a character set that is something other than your system's default character set, you will need to set the encoding options.


Standard extension:  txt. csv


Reading ASCII Delimited Files

When reading ASCII delimited files, you can use the user interface or command processor options to specify:










All of the user interface options available for reading ASCII files are set in the Options dialog box, in the sections Date/Time Formats - Reading and ASCII/Text File - Read Options.  The command processor options can be found in Setting Options with the Set Command.


If you wish to have more flexibility in reading delimited files, you can describe the file with a Schema file.


Writing ASCII Files

When writing ASCII delimited files, you can specify:







All of the options available for writing ASCII files are set in the Options dialog box, in the sections Date/Time Formats - Writing and ASCII/Text File - Write Options.  The command processor options can be found in Setting Options with the Set Command.


Missing Values

By default, missing values are indicated on input and output by one delimiter immediately following another.  You may change this default behavior in the ASCII/Text File - Write Options section of the Options dialog box.  Extended missing values are supported.


When an ASCII file with extended missing values is transferred to a SAS or Stata file, the input missing values will transfer to the equivalent SAS ones.  When a SAS file is transferred to an ASCII file with extended missing values specified, any missing values '._' in the input SAS file are written out as  '.' in the output.


Note that if a blank is used as the delimiter, missing values will be hard to determine.


Output Variable Types

The output variable type that results from each target variable type is given in the following table:



Target Type

Output Type


byte

int

long

float

double

Number (with a precision of up to 15 decimal places)


string

Character


date

time

date/time

Character (written using ASCII format options currently in effect)


See also:

ASCII Schema Files