[SAS base] Proc Export

Source: Internet
Author: User
Tags dbase microsoft access database
 

 

Proc export can export two types of files:

  • Export the delimited file
    1 * example; 2 proc export data = hotels 3 OUTFILE = 'C: \ myrawdata \ Alibaba s.txt '/* The suffix name determines the format of the output file. In addition, the value can also be specified using the DBMS = option. */4/* For example, if the space-delimited file does not have a standard suffix, you can only use the DBMS = option to output */5 DBMS = DLM/* If the CSV file is output, DBMS = CSV; 6. If the TXT file is output, DBMS = tab; 7 if the spaced-delimited file is output, DBMS = DLM */8 replace; /* replace an existing file with the same name */9 delimiter = '&';/* If delimiter = is used, no matter what suffix is used, the file will output the separator file specified in this statement */10 run;

     

  • PC File Export: Applicable to Microsoft Excel, Lotus (excluding UNIX), dBase, Microsoft Access, JMP, paradox, SPSS, Stata
    1. General Form of output PC files (except Microsoft Access): Proc export data = data-set OUTFILE = 'filename' DBMS = DBMS-identifier replace; sheet = 'sheet-name';/* is only required when you need to customize the sheet name. By default, the sheet name is the same as that of the SAS dataset. note: sheet-name cannot end with $ */run. [file suffixes of various PCs and corresponding DBMS identifier] type of file suffix DBMS identifier Microsoft Excel :. XLS ------------- Excel (32-bit windows) ----------- XLS (Unix or 64-bit windows) DBASE. DBF ------------ dbf jmp. JMP ------------ JMP Lotus. wk4 ------------ wk4 paradox. DB ------------ paradox SPSS save file. sav ----------- sav Stata. DTA ------------ DTA 2. General Form of output Microsoft Access File: Proc export data = data-set outtable = 'filename'/* specifies the table name in the database, note that outtable */DBMS = DBMS-identifier;/* The suffix of the Microsoft Access file is. mdb, DBMS identifier is access (97) or Access97 (00 or 03) */database = 'filename '; /* specify the Microsoft Access database to be modified or created */run;

     

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.