CSV2XPT COMMAND LINE REFERENCE



CSV2XPT command line reference

Convert CSV format file(s) to SAS XPORT (transport) format.

Usage: CSV2XPT.exe [Switches] [InputFile1] [InputFile2]…

Arguments

InputFile Source CSV file(s) data from which will be combined into a single XPT file.

Switches

All switches are optional.

/help Displays usage information. /? or /h are also acceptable.

For example: CSV2XPT.exe /?

@file Text files that contain command line switches. Each switch can be on a separate line or all switches can be on one line. Comment lines are prefaced with a # symbol.

/log: Specifies file name that will log all messages. If not specified, log information including error messages will be output to a console (short form /l).

For example:

CSV2XPT.exe /log:c:\utilities\log\csv2xpt.log

/output: Output file name for generated XPT file. If not specified, name of the first CSV file will be used for an output file name with xpt extension (short form /o).

/stdout Redirects output to a console. If not specified, XPT content will be output to a file (short form /s).

/delimiter: Specifies delimiter that will be used for separating values in CSV file. To specify TAB character you should type \t. If not specified, default value: ',' (short form /d).

Examples

The following example converts CSV file to XPT. It will create c:\data\sas\patients_2008_lm13a.xpt output file:

CSV2XPT.exe c:\data\sas\patients_2008_lm13a.csv

The following example combines multiple CSV files into a single XPT. Each CSV file will be a separate dataset in a single XPORT file:

CSV2XPT.exe c:\data\sas\patients_2008_lm13a.csv c:\data\sas\patients_2008_lm27a.csv /o:c:\data\sas\patients_2008.xpt

To import data from pipe-delimited file(s):

XPT2CSV.exe /delimiter:| c:\data\sas\patients_2008_lm13a.csv

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download