AS users and programmers are familiar with the traditional way in which SAS reads external files such as CSV or TXT files using Filename and Infile statement. For example:
The IMPORT procedure statement arguments: DATAFILE= DBMS= OUT= REPLACE Data source statements: GETNAMES= Other features: PRINT procedure
This example imports the following comma-delimited file and creates a temporary SAS data set named WORK.SHOES. GETNAME= is set to 'no', so the variable names in record 1 are not used. DATAROW=2 begins reading data from record 2. "Africa","Boot","Addis Ababa","12","$29,761","$191,821","$769"
Program proc import datafile="C:\temp\test.csv" out=shoes dbms=csv replace; getnames=no; run; proc print; run;
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!