Chapter 9. More data input and output

Chapter 9. More data input and output - 1 More data input...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 More data input and output 2 ¡ Sharing data with other software ¢ Read data from other software ¢ Save data in a format for other ¡ Some useful tools to enhance LIST input method ¢ The colon (:) modifier ¢ The ampersand (&) modifier ¢ The slash (/) pointer control ¢ The double @ line-hold specifier 3 PROC IMPORT with delimited file ¡ To read in delimited files ¢ INFILE statement with DLM and DSD options in Data Step ¢ PROC IMPORT ¢ IMPORT wizard ¡ PROC IMPORT and IMPORT wizard saves time to write Data Step but lose flexibility 4 PROC IMPORT / IMPORT wizard ¡ Scan the input data ¡ Automatically determine the variables types ¢ Character or numeric ¡ Automatically assign proper lengths to character variables ¡ Treat 2 consecutive delimiters as a missing value ¡ Can read values enclosed by quotation marks ¡ Assign missing values to variables when it runs out of data one a line 5 Example ¡ PROC IMPORT to import a comma-delimited (csv) file names IMPORT.CSV ¡ A comma-separated values (csv) file is to be imported ¡ The location of the input file is specified by the DATAFILE= option ¡ The SAS data set to be created is specified by the OUT= option * example 9.1 - import a csv file; proc import datafile='C:\temp\import.csv' out=import dbms=csv replace; * overwrite existing data set; run; proc print data=import; run; proc contents data=import varnum; *Print a list of the variables by their logical position in the data set ; run; 6 ¡ Some DBMS= delimited identifier Microsoft Windows * .xls Excel 2000 or 2002 spreadsheet EXCEL OpenVMS Alpha, UNIX, Microsoft Windows .* delimited file (default delimiter is a blank) DLM UNIX, Microsoft Windows .dbf dBASE 5.0, IV, III+, and III files DBF OpenVMS Alpha, UNIX, Microsoft Windows .csv delimited file (comma- separated values) CSV Microsoft Windows * .mdb Microsoft Access 2000 or 2002 table ACCESS Host Availability Extension Input Data Source Identifier 7 IMPORT Wizard ¡ SAS IMPORT wizard is a series of menu- driven dialogue to define the details for the import ¡ From menu File Î Import data 8 ¡ Select the file type 9 ¡ Select the input file 10 ¡ Press Option ¢ Specify the delimiter ¢ Specify if the first row contains the variable names ¢ Specify where the data values start 11 ¡ Specify the library and the data set name 12 ¡ Press finish ¡ Replace existing data set or not 13...
View Full Document

Page1 / 31

Chapter 9. More data input and output - 1 More data input...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online