![]() ![]() INFILE egov LRECL=250 FIRSTOBS=7 OBS=700 ![]() It reads an ASCII text file that is typically delimited by a space (default), Tab, comma, or other delimiters. The INFILE statement identifies external files to be read in the INPUT statement. If you have a data set generated in other software packages (e.g., Excel, dBASE III, Paradox, Stata, and SPSS), use a data conversion utility like Stat/Transfer. Personally, I prefer the IMPORT Wizard to PROC IMPORT due to its user-friendly interface and flexibility. If you have simple data, read them using INFILE and DATALINES otherwise, use PROC IMPORT. PROC IMPORT reads ASCII text files, database ( ACCESS, dBASE), and spreadsheet (Lotus 1-2-3, Excel). ![]() INFILE and DATALINES also read data in a matrix form. The INFILE statement reads data directly using the DATALINES (CARDS) statement, imports various ASCII text files, and imports data sets through network (i.e., FTP and HTTP). INFILE should be used in a DATA step, while PROC IMPORT and PROC EXPORT are independent procedures. You may use the PUT statement in a Data Step or PROC EXPORT to export data sets into external files. In general, SAS reads data using the INFILE statement and PROC IMPORT. In SAS, there are various data sources as shown in the following figure. Otherwise, you have to add " noterminal" to a command (e.g., " sas -noterminal file_name.sas"). In UNIX, PROC IMPORT and PROC EXPORT must be executed under the X window. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |