DATAFILES ][ ASCII ][  SAS  ][ SASXPORT  ][ SUDAAN  ][ SUDXPORT  ][ SPSS  ]

SASXPORT DATA FILES

FILETYPE=SASXPORT

Beginning with Release 7.5.4, standalone SUDAAN can directly read data files created by SAS in XPORT format, and can also write files in the SAS XPORT format. For both reading and writing these files simply use FILETYPE=SASXPORT on the PROC or OUTPUT statements. Note that the SASXPORT file type is the XPORT file type supported by SAS which has been recently adopted by the FDA as a standard for data submissions. The structure of this file type is fully documented at SAS Institute's web site. This is an important new feature for users of standalone SUDAAN who wish to use data from SAS or to do further analysis of SUDAAN results within SAS, since SAS no longer exports or imports version 6.04 SAS data sets.

The SAS XPORT file format does not support the longer variable names and labels that are available in SAS beginning with Version 7, and which are now also supported in SUDAAN beginning with this Release 7.5.5. Within SAS you cannot write variables with long names and/or labels to an XPORT file. However in SUDAAN, you can do this since SUDAAN automatically creates a second file, also in XPORT format which links long and short forms of variable names and labels. On output to a SASXPORT file, SUDAAN truncates long variable names and labels in a unique way so that different variables always have distinct names up to the limit of 8 characters. Whenever there is any truncation, SUDAAN saves a separate data set, also in SASXPORT format, with records whose data link old and new variable names and labels. In addition, whether or not there are any long variable names or labels, SUDAAN preserves any labels associated with the variables in a separate SASXPORT file. This file has the same structure as a SAS format catalog which has been saved in XPORT format. This means that SAS users can easily import their labels from SUDAAN into SAS along with their data.

To support these changes, two new options are now available on both the PROC and OUTPUT statements when FILETYPE=SASXPORT is used: NAMEFILE and LEVFILE.

There are two common extensions for files in SAS XPORT format: ‘.stx' and ‘.xpt'. To make sure SUDAAN reads or creates the file with the extension you intend, include it in the file specification in any of the following parameters on the PROC statement

DATA

PSUDATA

REPDATA

NAMEFILE

LEVFILE

and include it in the file specification in the following parameter on the OUTPUT statement:

FILENAME

NAMEFILE

LEVFILE

If you do not specify an extension, SUDAAN will use the extension ‘.stx' by default on input and on output. On input, if SUDAAN supplies ‘.stx' and does not find an input data set by the given name, it will try supplying the extension ‘.xpt' before giving up.

EXAMPLE