The Programmer's Solution to the Import/Export Wizard
|
|
- Morgan O’Neal’
- 6 years ago
- Views:
Transcription
1 The Programmer's Solution to the Import/Export Wizard Lora D. Delwiche, University of California, Davis, CA Susan J. Slaughter, SAS Consultant, Davis, CA Abstract Do you like what the Import/Export Wizard does for you, but you are not really a GUI person? If the answer is yes, then there is good news for you. Version 7 of the SAS System has two new procedures: IMPORT and EXPORT. The IMPORT procedure can read your CSV and tab delimhed files, and if you have SAS/ACCESS to PC File Formats licensed, you can also read dbase, Excel, and Lotus files. The IMPORT procedure also supports Microsoft Access databases. The EXPORT procedure does the opposhe of IMPORT, converting your SAS data sets into other file types. No more clicking your way through window after window, now you can import and export data with just one or two lines of good oldfashioned SAS code. Introduction There are many new features in Version 7 of the SAS system, but one that will warm the hearts of every programmer, are the IMPORT and EXPORT procedures. The Import and Export Wizards, which perform the same functions as the IMPORT and EXPORT procedures, were first available in release 6.12 of SAS. The Wizards are Graphical User Interfaces for importing and exporting delimhed files as well as several popular database formats (if you have SAS/ACCESS to PC File Formats). The problem whh the Wizards is that you can't put them in a SAS program. Now with Version 7, you can write just a few lines of SAS code to read or write delimited or database files. Unfortunately the IMPORT and EXPORT procedures (as well as the Import and Export Wizards) are only available for Windows, 05/2, UNIX, and VMS operating environments. Using IMPORT for reading delimited files Delimited files are raw data files that have a defined character that separates data values: typically spaces, commas or tab characters. Because most software applicaitons can create delimited files, it is useful to learn how to read delimited files into SAS. Delimited files can be tricky to read using just a DATA step, because they often have features that cannot be read using the default SAS settings. The IMPORT procedure easily reads many types of delimited files, doing much of the work for you. IMPORT will scan your data file and automatically determine the variable types (character or numeric), will assign proper lengths to the character variables, and can recognize some date formats. IMPORT will treat two consecutive delimiters in your data file as a missing value, will read values enclosed by quotes, and assign missing values to variables when it runs out of data on a line. Also, if you want, you can use the first line in your data file for the variable names. The IMPORT procedure actually writes a OAT A step for you and after you submit your program, you can look in the log window to see the DATA step it produced. The simplest form of the IMPORT procedure is: PROC IMPORT DATAFILE= 'your-filename' OUT=data-set; where the file you want to read follows the DATAFILE= option and the name of the SAS data set you want to create follows the OUT= option. SAS will determine the file type by the extension of the file as shown in table 1. Table 1. Data file types, extensions, and identifiers for delimited files for PROC IMPORT. Type of Ale Comma delimited Tab delimited Delimiters other than commas and tabs Extension Identifier.csv csv.txt TAB DLM If your file does not have the proper extension, or your file is of type DLM, then you must use the = option to the PROC IMPORT statement. Another option that you might need is REPLACE. If you already have a SAS data set with the name you specified in the OUT= option, then IMPORT will not overwrite it. If you want to overwrhe H, then use the REPLACE option. The following shows both the REPLACE and the options: PROC IMPORT DATAFILE= your-t'ilename' OUT= data-set =identit'ier The IMPORT procedure will, by default, get variable names from the first line in your data file. If the first line in your data files does not have variable names, or you don't want to read them, then add the GETNAMES=NO; statement after the PROC IMPORT statement. Then IMPORT will assign the variables the names VAR1, VAR2, VAR3, and so on. Also if your data file is type DLM, IMPORT assumes that the delimher is a space. If you have a delimiter other than a space, then specify it in 92
2 the DELIMITER= statement. The following shows all the options and statements that pertain to reading delimited files: PROC IMPORT DATAFILE='your-file-name' OUT=dataset-name =DLM GETNAMES=NO; DELIMITER=" delimiter-character'; Example Table 2 shows an example of a comma separated values (CSV) file. The file gives information about several tourist attractions: country, state or province, name of the attraction, adult price, currency, and the date the information was last updated. The first line of the file has labels that can be used for variable names (remember that in Version 7 variable names can be up to 32 characters). The file has some missing data in the Price field (indicated by two consecutive commas), one value for Attraction that is enclosed in quotes because it has an embedded comma, and it has a date field, Updated. The following program reads the data file using the first data line for the variable names and creates a SAS data set named TOURISTSPOTS. Note that it takes only one program statement to read the file. The results of the PROC PRINT can be found in table 3. PROC IMPORT PATAFILE='c:\MyRawData\WUSS9Sin.csv' PROC PRINT; RUN; OUT=touristspots TITLE 'Tourist Attractions'; Notice that, in addition to correctly identifying variable types and lengths, IMPORT also assigns a date informal and format to the variable Updated. The variable's names are taken from the first line in the data file. For fields that have spaces in the variable names, SAS inserts an underscore, so that the variable still conforms to the default rules for variable names. Table 2. CSV data file Country,State or Province,Attraction,Price,Currency,Updated USA,Hawaii,Waikiki Aquarium,6,Dollars,07/ll/98 USA,Hawaii,Polynesian cultural Center,75,Dollars,07/ll/98 USA,Hawaii,Punaluu Black Sand Beach,O,Dollars,07/11/98 USA,Hawaii,Hawaii Volcanoes National Park,O,Dollars,07/ll/98 USA,Hawaii,Koko Crater Botanical Garden,O,Dollars,07/11/98 Belgium,Brussel,Royal Army Museum,O,BEF,03/06/97 Belgium,Brussel,"Atomium,Mini-Europe,soo,BEF,03/06/97 Belgium,Luxembourg,Bastonge American Memorial,245,BEF,03/06/97 Belgium,Liege,Caves of Remouchamps,290,BEF,03/06/97 Belgium,Brabant,Grottes De Folx-les-caves,,BEF,03/06/97 Table 3. SAS data set created from a CSV file State_or_ Tourist Attractions Obs Country Province Attraction Price currency 1 USA Hawaii Waikiki Aquarium 6 Dollars 2 USA Hawaii Polynesian Cultural center 75 Dollars 3USA Hawaii Punaluu Black Sand Beach o Dollars 4 USA Hawaii Hawaii Volcanoes National Park 0 Dollars 5 USA Hawaii Koko Crater Botanical Garden o Dollars 6 Belgium Brussel Royal Army Museum 0 BEF 7 Belgium Brussel Atomium,Uini-Europe 500 BEF 8 Belgium Luxembourg Bastonge American Memorial 245 BEF 9 Belgiu Liege Caves of Remouchamps 290 BEF 10 Belgium Brabant Grottes De Folx-les-Caves BEF Updated 93
3 The following is the SAS log from this program. Notice that IMPORT writes a DATA step where it assigns lengths to character variables, and informats and formats. 1 OPTIONS NODATE LINESIZE=100; 2 PROC IMPORT DATAFILE='c:\MyRawData\WUSS98in.csv' 3 OUT=touristspots 4 PROC PRINT; 5 /*********************************************** *********************** 6 PRODUCT: SAS 7 VERSION: CREATOR: External File Interface - Version DATE: 28JUL98 10 DESC: Generated SAS Datastep Code 11 TEMPLATE SOURCE: (None Specified.) 12 ************************************************ ***********************! data WORK.TOURISTSPOTS %let _EFIERR_ = 0; /* clear ERROR detection macro variable*/ infile 'd:\temp\lora\wuss98in.csv' delimiter=',' MISSOVER DSD lrecl=32767 firstobs=2 ; format Country $9. ; format State_or_Province $12. format Attraction $35. format Price best12. ; format Currency $7. ; format Updated mmddyy10. informat Country $9. ; input informat State_or_Province $12. informat Attraction $35. informat Price best32. ; informat currency $7. ; informat Updated mmddyy10. Country $ State_or_Province $ Attraction $ Price Currency $ Updated If _ERROR_ then!* ERROR detection */ 37 call symput('_efierr_',1); 38 run; RECFM=V,LRECL=32767 NOTE: 10 records were read from the infile c:\myrawdata\wuss98in.csv'. The minimum record length was 45. The maximum record length was 60. NOTE: The data set WORK.TOURISTSPOTS has 10 observations and 6 variables. NOTE: DATA statement used: real time 3.52 seconds 10 rows created in WORK.TOURISTSPOTS from c:\myrawdata\wuss98in.csv. NOTE: WORK.TOURISTSPOTS was successfully created. NOTE: PROCEDURE IMPORT used: real time seconds 39 TITLE 'Tourist Attractions'; 40 RUN; NOTE: PROCEDURE PRINT used: real time 2.51 seconds Using IMPORT for reading database files If you have SAS/ACCESS for the PC File Formats installed on your computer, then you can use IMPORT to read data from several popular PC applications. The general form of the IMPORT procedure for reading database files is the same as for reading delimited files: PROC IMPORT DATAFILE='your-filename' OUT=daea-see; where the file you want to read follows the DATAFILE= option and the name of the SAS data set you want to create follows the OUT= option. SAS will determine the file type by the extension of the file. Table 4 gives the extensions and their corresponding files types and identifiers for dbase, Lotus and Excel files. ' NOTE: Numeric values have been converted to character values at the places given by: (Line): (Column). 37:31 NOTE: The infile c:\myrawdata\wuss98in.csv' is: File Name=c:\MyRawData\WUSS98in.csv, 94
4 Table 4. Data file types, extensions, and identifiers for database and spreadsheet files for PROC IMPORT. Type of File Extension Identifier Excel4 or 5.xis EXCEL Excel97 EXCEL97 Lotus Files. wk1,.wk3, WK1,.wk4 WK3,WK4 dbase. dbf DBF If your file does not have the proper extension, or if you have an Excel 97 file, then you must use the = option to the PROC IMPORT statement. In addition, you may want to use the REPLACE option if you want SAS to write over SAS data sets with the same name as specified in the OUT= option. For example, if you wanted to read an Excel 97 file named Restaurants.xls in the MyRawData directory on the C drive (Windows, OS/2), and you wanted to replace any existing SAS data sets named BESTRESTAURANTS, then you could use the following statement: PROC IMPORT DATAFILE='C:\MYRawData\Restaurants.xls' OUT=bestrestaurants =EXCEL97 As with delimited files, IMPORT will get the variable names from the first row of a spreadsheet. If you do not want IMPORT to do this, then add the GETNAMES=NO optional statement (The GETNAMES= statement is not valid for dbase files.): PROC IMPORT DATAFILE='C:\MyRawData\Restaurants.xls' OUT:bestrestaurants =EXCEL97 GETNAMES=NO; There are additional optional statements in PROC IMPORT that give you control over which spreadsheet to read (for files that contain multiple spreadsheets) as well as the range of cells within a spreadsheet. Also, it is possible to read tables such as Microsoft Access. These features of IMPORT are not covered in this paper. Please refer to the online documentation for version 7 of the SAS software for more information about these features. Using EXPORT for creating delimited files The EXPORT procedure does basically the opposite of the IMPORT procedure. With EXPORT you can convert your SAS data sets into delimited files. The general form of PROC EXPORT for creating delimited fhes is: PROC EXPORT DATA = data-set OUTFILE = 'filename'; where data-set is the SAS data set you are reading, and filename is the name you make up for the output data file. For example, the following statement tells SAS to read a data set named HOTELS and write a comma-delimited file named Hotels.csv in the a directory named MyRawData on the C drive (Windows, OS/2). PROC EXPORT DATA = hotels OUTFILE = c:\myrawdata\hotels.csv'; SAS uses the last part of the file-name, also called the file extension, to decide what type of file to create. You can also specify the file type by adding the = option. Table 5 shows the file-name extensions and identifiers currently available with Base SAS. Table 5. Data file types, extensions, and identifiers for delimited files in PROC EXPORT. Type of file Extension Identifier Comma.csv csv Separated Values Tab-delimited file.txt TAB Space-delimited DLM file Notice that for space-delimited files, there is no standard extension so you must use the = option. The REPLACE option tells SAS that it is ok to replace any existing file with the same name. The following statement, containing the = option, tells SAS to create a space-delimited file named Hotels.spc and to replace any other file with that name. PROC EXPORT DATA = hotels OUTFILE = 'c:\myrawdata\hotels.spc' = DLM If you want to use a delimiter other than tabs, spaces, or commas, then add the DELIMITER= statement. For example, to place a pound sign (#)between data values, use: PROC EXPORT DATA = hotels OUTFILE = 'c:\myrawdata\hotels.spc' = DLM DELIMITER= '#'; Using EXPORT for creating database files If you have SAS/ACCESS to PC File Formats, you can also export database and spreadsheet files. The general form for this is the same as for delimited files: PROC EXPORT DATA = data-set OUTFILE = 'filename REPLACE =identifier; Use the REPLACE option only if you want to allow EXPORT to overwrite existing files with the same name. As with creating delimited files, if you do not include the = option, EXPORT determines the file type by the 95
5 extension of the file you specify. Table 6 shows the extensions and their identifiers. Table 6. Data file types, extensions, and identifiers for spreadsheet and database files in PROC EXPORT. Type of File Extension Excel 5.xis Excel 4 Excel97 Lotus Files dbase Example.wkl,.wk3,.wk4.dbf Identifier EXCEL EXCEL4 EXCEL97 WK1, WK3, WK4 DBF The foilowing program takes the SAS data set, TOURISTSPOTS, created in the first example (using IMPORT to read a CSV file), and creates an Excel 5 file. PROC EXPORT DATA = touristspots OUTFILE = 'C:\MyRawData\WUSS98out.xls' RUN; =EXCEL The following is the SAS log from the above program: NOTE: NOTE: NOTE: PROC EXPORT DATA = touristspots OUTFILE = 'c:\myrawdata\wuss98out.xls' =EXCEL Load completed. Examine statistics below. Inserted (10) obs into WUSS98out.xls. Rejected (0) insert attempts see the log for details. NOTE: c:\myrawdata\wuss98out.xls was successfully created. NOTE: PROCEDURE EXPORT used: 96 RUN; real time 4.73 seconds You can see from the notes, that 10 observations were inserted into the Excel spreadsheet. Figure 1 shows what the spreadsheet looks Hke when you open it into Excel. Notice that the variable names appear in the first row of the spreadsheet. Figure 1. Excel spreadsheet created from a SAS data set using PROC EXPORT 96
6 Conclusions When you want to import or export data, and need the steps included in a SAS program, Version 7 of the SAS software gives you two powerful procedures: IMPORT and EXPORT. You can import delimited files into SAS data sets, and export SAS data sets to delimited files. And, if you have SAS/ACCESS to PC Rle Formats, you can also import and export many popular database formats as well. References Delwiche, Lora D. and Susan J. Slaughter (In Print). The Little SAS Book: A Primer, Second Edition. SAS Institute, Cary, NC. SAS OnlineDoc, Version 7 (1998). SAS Institute, Cary, NC. About the Authors Lora Delwiche and Susan Slaughter are also the authors of The Little SAS Book: A Primer and The Little SAS Book: A Primer. Second Edition. Published at SAS Institute, and may be contacted at: Lora D. Delwiche Information Technology/ANSA University of California, Davis Davis, CA (530) llddelwiche@ucdavis.edu Susan J. Slaughter susanj@ mother.com SAS, and SAS/ACCESS are registered trademarks of SAS Institute Inc. in the USA and other countries. Indicates USA registration. 97
An Everyday Guide to Version 7 of the SAS System
An Everyday Guide to Version 7 of the SAS System Susan J. Slaughter, Independent Consultant, Davis, CA Lora D. Delwiche, IT/ANSA, University of California, Davis, CA What is an everyday guide? Version
More informationDynamic Projects in SAS Enterprise Guide How to Create and Use Parameters
Paper HW02 Dynamic Projects in SAS Enterprise Guide How to Create and Use Parameters Susan J. Slaughter, Avocet Solutions, Davis, CA Lora D. Delwiche, University of California, Davis, CA ABSTRACT SAS Enterprise
More informationChapter 2: Getting Data Into SAS
Chapter 2: Getting Data Into SAS Data stored in many different forms/formats. Four categories of ways to read in data. 1. Entering data directly through keyboard 2. Creating SAS data sets from raw data
More informationSAS/ACCESS 9.2. Interface to PC Files Reference. SAS Documentation
SAS/ACCESS 9.2 Interface to PC Files Reference SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2009. SAS/ACCESS 9.2 Interface to PC Files: Reference.
More informationProducing Summary Tables in SAS Enterprise Guide
Producing Summary Tables in SAS Enterprise Guide Lora D. Delwiche, University of California, Davis, CA Susan J. Slaughter, Avocet Solutions, Davis, CA ABSTRACT This paper shows, step-by-step, how to use
More informationThe EXPORT Procedure. Overview. Procedure Syntax CHAPTER 18
423 CHAPTER 18 The EXPORT Procedure Overview 423 Procedure Syntax 423 PROC EXPORT Statement 424 Data Source Statements 425 Examples 427 Example 1: Exporting a Delimited External File 427 Example 2: Exporting
More informationWriting Programs in SAS Data I/O in SAS
Writing Programs in SAS Data I/O in SAS Statistics 135 Autumn 2005 Copyright c 2005 by Mark E. Irwin Writing SAS Programs Your SAS programs can be written in any text editor, though you will often want
More informationReading data in SAS and Descriptive Statistics
P8130 Recitation 1: Reading data in SAS and Descriptive Statistics Zilan Chai Sep. 18 th /20 th 2017 Outline Intro to SAS (windows, basic rules) Getting Data into SAS Descriptive Statistics SAS Windows
More informationUsing SAS Enterprise Guide to Coax Your Excel Data In To SAS
Paper IT-01 Using SAS Enterprise Guide to Coax Your Excel Data In To SAS Mira Shapiro, Analytic Designers LLC, Bethesda, MD ABSTRACT Kirk Paul Lafler, Software Intelligence Corporation, Spring Valley,
More informationSAS 101. Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23. By Tasha Chapman, Oregon Health Authority
SAS 101 Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23 By Tasha Chapman, Oregon Health Authority Topics covered All the leftovers! Infile options Missover LRECL=/Pad/Truncover
More informationContents About SAS Enterprise Guide About This Book xi Acknowledgments xiii
The Little SAS Enterprise Guide Book. Full book available for purchase here. Contents About SAS Enterprise Guide About This Book xi Acknowledgments xiii ix Tutorials Section 1 Tutorial A Getting Started
More informationSAS/ACCESS Interface to PC Files for SAS Viya 3.2: Reference
SAS/ACCESS Interface to PC Files for SAS Viya 3.2: Reference SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2017. SAS/ACCESS Interface to PC Files
More informationChapter 5: Compatibility of Data Files
Importing data from other format Files Chapter 5: Compatibility of Data Files Importing Text Files Creating a translation structure Example. Import 'EmployeePayroll.txt' as 'EmployeePayroll.mb' Importing
More informationSAS/ACCESS Interface to PC Files for SAS Viya : Reference
SAS/ACCESS Interface to PC Files for SAS Viya : Reference SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2016. SAS/ACCESS Interface to PC Files for
More informationDSCI 325: Handout 2 Getting Data into SAS Spring 2017
DSCI 325: Handout 2 Getting Data into SAS Spring 2017 Data sets come in many different formats. In some situations, data sets are stored on paper (e.g., surveys) and other times data are stored in huge
More informationManual Physical Inventory Upload Created on 3/17/2017 7:37:00 AM
Created on 3/17/2017 7:37:00 AM Table of Contents... 1 Page ii Procedure After completing this topic, you will be able to manually upload physical inventory. Navigation: Microsoft Excel > New Workbook
More informationSTAT:5400 Computing in Statistics. Other software packages. Microsoft Excel spreadsheet very convenient for entering data in flatfile
STAT:5400 Computing in Statistics Other Software Packages Proc import A bit on SAS macro language Lecture 26 ov 2, 2016 Kate Cowles 374 SH, 335-0727 kate-cowles@uiowaedu Other software packages Microsoft
More informationWKn Chapter. Note to UNIX and OS/390 Users. Import/Export Facility CHAPTER 9
117 CHAPTER 9 WKn Chapter Note to UNIX and OS/390 Users 117 Import/Export Facility 117 Understanding WKn Essentials 118 WKn Files 118 WKn File Naming Conventions 120 WKn Data Types 120 How the SAS System
More informationGetting Your Data into SAS The Basics. Math 3210 Dr. Zeng Department of Mathematics California State University, Bakersfield
Getting Your Data into SAS The Basics Math 3210 Dr. Zeng Department of Mathematics California State University, Bakersfield Outline Getting data into SAS -Entering data directly into SAS -Creating SAS
More informationPROC IMPORT and more. Or: when PROC IMPORT just doesn't do the job
ABSTRACT SESUG Paper BB-180-2017 PROC IMPORT and more. Or: when PROC IMPORT just doesn't do the job David B. Horvath, MS, CCP PROC IMPORT comes in handy when quickly trying to load a CSV or similar file.
More informationUpdating Users. Updating Users CHAPTER
CHAPTER 18 Update the existing user information that is in the database by using the following procedure:, page 18-1 Retaining Stored Values, page 18-2 Using the BAT Spreadsheet to Create a CSV Data File
More informationSAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2
SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Department of MathemaGcs and StaGsGcs Phone: 4-3620 Office: Parker 364- A E- mail: carpedm@auburn.edu Web: hup://www.auburn.edu/~carpedm/stat6110
More informationMoving Data and Results Between SAS and Excel. Harry Droogendyk Stratia Consulting Inc.
Moving Data and Results Between SAS and Excel Harry Droogendyk Stratia Consulting Inc. Introduction SAS can read ( and write ) anything Introduction In the end users want EVERYTHING in. Introduction SAS
More informationBase and Advance SAS
Base and Advance SAS BASE SAS INTRODUCTION An Overview of the SAS System SAS Tasks Output produced by the SAS System SAS Tools (SAS Program - Data step and Proc step) A sample SAS program Exploring SAS
More informationUse That SAP to Write Your Code Sandra Minjoe, Genentech, Inc., South San Francisco, CA
Paper DM09 Use That SAP to Write Your Code Sandra Minjoe, Genentech, Inc., South San Francisco, CA ABSTRACT In this electronic age we live in, we usually receive the detailed specifications from our biostatistician
More informationUsing Dynamic Data Exchange
145 CHAPTER 8 Using Dynamic Data Exchange Overview of Dynamic Data Exchange 145 DDE Syntax within SAS 145 Referencing the DDE External File 146 Determining the DDE Triplet 146 Controlling Another Application
More informationOther Data Sources SAS can read data from a variety of sources:
Other Data Sources SAS can read data from a variety of sources: Plain text files, including delimited and fixed-column files Spreadsheets, such as Excel Databases XML Others Text Files Text files of various
More informationImporting CSV Data to All Character Variables Arthur L. Carpenter California Occidental Consultants, Anchorage, AK
PharmaSUG 2017 QT02 Importing CSV Data to All Character Variables Arthur L. Carpenter California Occidental Consultants, Anchorage, AK ABSTRACT Have you ever needed to import data from a CSV file and found
More informationAccessing Data and Creating Data Structures. SAS Global Certification Webinar Series
Accessing Data and Creating Data Structures SAS Global Certification Webinar Series Accessing Data and Creating Data Structures Becky Gray Certification Exam Developer SAS Global Certification Michele
More informationExchanging data between SAS and Microsoft Excel
Paper CC 011 Exchanging data between SAS and Microsoft Excel Yuqing Xiao, Southern Company, Atlanta, GA ABSTRACT Transferring data between SAS and Microsoft Excel has gained popularity over the years.
More informationWrite SAS Code to Generate Another SAS Program A Dynamic Way to Get Your Data into SAS
Paper 175-29 Write SAS Code to Generate Another SAS Program A Dynamic Way to Get Your Data into SAS Linda Gau, Pro Unlimited @ Genentech, Inc., South San Francisco, CA ABSTRACT In this paper we introduce
More informationSAS Studio: A New Way to Program in SAS
SAS Studio: A New Way to Program in SAS Lora D Delwiche, Winters, CA Susan J Slaughter, Avocet Solutions, Davis, CA ABSTRACT SAS Studio is an important new interface for SAS, designed for both traditional
More informationINTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS
TO SAS NEED FOR SAS WHO USES SAS WHAT IS SAS? OVERVIEW OF BASE SAS SOFTWARE DATA MANAGEMENT FACILITY STRUCTURE OF SAS DATASET SAS PROGRAM PROGRAMMING LANGUAGE ELEMENTS OF THE SAS LANGUAGE RULES FOR SAS
More informationExternal Files. Definition CHAPTER 38
525 CHAPTER 38 External Files Definition 525 Referencing External Files Directly 526 Referencing External Files Indirectly 526 Referencing Many Files Efficiently 527 Referencing External Files with Other
More informationSAS Visual Analytics 7.3 for SAS Cloud: Onboarding Guide
SAS Visual Analytics 7.3 for SAS Cloud: Onboarding Guide Introduction This onboarding guide covers tasks that account administrators need to perform to set up SAS Visual Statistics and SAS Visual Analytics
More informationET01. LIBNAME libref <engine-name> <physical-file-name> <libname-options>; <SAS Code> LIBNAME libref CLEAR;
ET01 Demystifying the SAS Excel LIBNAME Engine - A Practical Guide Paul A. Choate, California State Developmental Services Carol A. Martell, UNC Highway Safety Research Center ABSTRACT This paper is a
More information17. Reading free-format data. GIORGIO RUSSOLILLO - Cours de prépara)on à la cer)fica)on SAS «Base Programming» 386
17. Reading free-format data 386 Reading free format data: The list input A raw dataset is free-format when it is not arranged in fixed fields. -> Fields are separated by a delimiter List input allows
More informationAdding Users. Adding Users CHAPTER
CHAPTER 15 You can use Cisco Unified Communications Manager Bulk Administration (BAT) to add a group of new users and to associate users to phones and other IP Telephony devices in the Cisco Unified Communications
More informationSAS CURRICULUM. BASE SAS Introduction
SAS CURRICULUM BASE SAS Introduction Data Warehousing Concepts What is a Data Warehouse? What is a Data Mart? What is the difference between Relational Databases and the Data in Data Warehouse (OLTP versus
More informationSAS Macro Programming for Beginners
ABSTRACT SAS Macro Programming for Beginners Lora D. Delwiche, Winters, CA Susan J. Slaughter, Avocet Solutions, Davis, CA Macro programming is generally considered an advanced topic. But, while macros
More informationStat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics
Stat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics Fritz Scholz Department of Statistics, University of Washington Winter Quarter 2015 February 19, 2015 2 Getting
More informationIntroduction OR CARDS. INPUT DATA step OUTPUT DATA 8-1
Introduction Thus far, all the DATA step programs we have seen have involved reading and writing only SAS data sets. In this chapter we will present techniques to read and write external or "raw" files
More informationCHAPTER 13 Importing and Exporting External Data
127 CHAPTER 13 Importing and Exporting External Data Chapter Overview 127 Exporting a File 127 Instructions 128 Exiting This Task 130 Importing Data from a Flat File 130 Instructions 130 Chapter Overview
More informationODS Meets SAS/IntrNet
Paper 9-27 ODS Meets SAS/IntrNet Susan J. Slaughter, Avocet Solutions, Davis, CA Sy Truong, Meta-Xceed, Inc, Fremont, CA Lora D. Delwiche, University of California, Davis Abstract The SAS System gives
More informationTab-Delimited File and Compound Objects - Documents, Postcards, and Cubes. (Not Monographs)
1" Tab-Delimited File and Compound Objects - Documents, Postcards, and Cubes (Not Monographs) See Help Sheet: Tab-Delimited File and Compound Object - Monograph Content "2" Page 4: Why use Tab-delimited
More informationBeginning Tutorials. PROC FSEDIT NEW=newfilename LIKE=oldfilename; Fig. 4 - Specifying a WHERE Clause in FSEDIT. Data Editing
Mouse Clicking Your Way Viewing and Manipulating Data with Version 8 of the SAS System Terry Fain, RAND, Santa Monica, California Cyndie Gareleck, RAND, Santa Monica, California ABSTRACT Version 8 of the
More informationSo, Your Data are in Excel! Ed Heaton, Westat
Paper AD02_05 So, Your Data are in Excel! Ed Heaton, Westat Abstract You say your customer sent you the data in an Excel workbook. Well then, I guess you'll have to work with it. This paper will discuss
More informationWRITE SAS CODE TO GENERATE ANOTHER SAS PROGRAM
WRITE SAS CODE TO GENERATE ANOTHER SAS PROGRAM A DYNAMIC WAY TO GET YOUR DATA INTO THE SAS SYSTEM Linda Gau, ProUnlimited, South San Francisco, CA ABSTRACT In this paper we introduce a dynamic way to create
More informationPaper A Transition from SAS on a PC to SAS on Linux: Dealing with Microsoft Excel and Microsoft Access
Paper 2753-2018 A Transition from SAS on a PC to SAS on Linux: Dealing with Microsoft Excel and Microsoft Access ABSTRACT Jesse Speer, Ruby Johnson, and Sara Wheeless, RTI International Transitioning from
More informationHOW TO USE THE EXPORT FEATURE IN LCL
HOW TO USE THE EXPORT FEATURE IN LCL In LCL go to the Go To menu and select Export. Select the items that you would like to have exported to the file. To select them you will click the item in the left
More informationExploring the Microsoft Access User Interface and Exploring Navicat and Sequel Pro, and refer to chapter 5 of The Data Journalist.
Chapter 5 Exporting Data from Access and MySQL Skills you will learn: How to export data in text format from Microsoft Access, and from MySQL using Navicat and Sequel Pro. If you are unsure of the basics
More informationChapter 7 File Access. Chapter Table of Contents
Chapter 7 File Access Chapter Table of Contents OVERVIEW...105 REFERRING TO AN EXTERNAL FILE...105 TypesofExternalFiles...106 READING FROM AN EXTERNAL FILE...107 UsingtheINFILEStatement...107 UsingtheINPUTStatement...108
More informationRecipe Costing: How To Import Your Supplier's Price Data - 1
Recipe Costing: How To Import Your Supplier's Price Data This tutorial shows you how to import your supplier's price data into Shop'NCook Pro software and how to update the price information. Exporting
More informationI KNOW HOW TO PROGRAM IN SAS HOW DO I NAVIGATE SAS ENTERPRISE GUIDE?
Paper HOW-068 A SAS Programmer s Guide to the SAS Enterprise Guide Marje Fecht, Prowerk Consulting LLC, Cape Coral, FL Rupinder Dhillon, Dhillon Consulting Inc., Toronto, ON, Canada ABSTRACT You have been
More informationStat 302 Statistical Software and Its Applications SAS: Data I/O
Stat 302 Statistical Software and Its Applications SAS: Data I/O Yen-Chi Chen Department of Statistics, University of Washington Autumn 2016 1 / 33 Getting Data Files Get the following data sets from the
More information5. Excel Fundamentals
5. Excel Fundamentals Excel is a software product that falls into the general category of spreadsheets. Excel is one of several spreadsheet products that you can run on your PC. Others include 1-2-3 and
More informationExporting Contacts and Updating the Contacts in Your New Vision Source Address
Exporting Contacts and Updating the Contacts in Your New Vision Source Email Address How to Export Yahoo Contacts You can export your contacts from Yahoo to an external file as a backup or in preparation
More informationCSV Import Guide. Public FINAL V
CSV Import Guide FINAL V1.1 2018-03-01 This short guide demonstrates how to prepare and open a CSV data file using a spreadsheet application such as Excel. It does not cover all possible ways to open files.
More informationAPPENDIX 4 Migrating from QMF to SAS/ ASSIST Software. Each of these steps can be executed independently.
255 APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software Introduction 255 Generating a QMF Export Procedure 255 Exporting Queries from QMF 257 Importing QMF Queries into Query and Reporting 257 Alternate
More informationChoosing the Right Tool from Your SAS and Microsoft Excel Tool Belt
Choosing the Right Tool from Your SAS and Microsoft Excel Tool Belt 2997 Yarmouth Greenway Drive, Madison, WI 53711 Phone: (608) 278-9964 Web: www.sys-seminar.com 1 Choosing the Right Tool from Your SAS
More informationInterfacing with MS Office Conference 2017
Conference 2017 Session Description: This session will detail procedures for importing/exporting data between AeriesSIS Web Version/AeriesSIS Client Version and other software packages, such as word processing
More informationA Step by Step Guide to Learning SAS
A Step by Step Guide to Learning SAS 1 Objective Familiarize yourselves with the SAS programming environment and language. Learn how to create and manipulate data sets in SAS and how to use existing data
More information.txt - Exporting and Importing. Table of Contents
.txt - Exporting and Importing Table of Contents Export... 2 Using Add Skip... 3 Delimiter... 3 Other Options... 4 Saving Templates of Options Chosen... 4 Editing Information in the lower Grid... 5 Import...
More informationPageScope Account Manager Ver. 2.0 User s Guide
PageScope Account Manager Ver..0 User s Guide Account Manager Contents 1 General 1.1 Account Manager...1-1 Counter information... 1-1 Accounting... 1-1 Analysis... 1-1 Upper Limit Settings... 1-1 1. General
More informationObjectives Reading SAS Data Sets and Creating Variables Reading a SAS Data Set Reading a SAS Data Set onboard ia.dfwlax FirstClass Economy
Reading SAS Data Sets and Creating Variables Objectives Create a SAS data set using another SAS data set as input. Create SAS variables. Use operators and SAS functions to manipulate data values. Control
More informationIntroduction to SAS Mike Zdeb ( , #1
Mike Zdeb (402-6479, msz03@albany.edu) #1 (1) INTRODUCTION Once, the acronym SAS actually did stand for Statistical Analysis System. Now, when you use the term SAS, you are referring to a collection of
More informationIntroduction to SAS. Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC
Introduction to SAS Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC cmurray-krezan@salud.unm.edu 20 August 2018 What is SAS? Statistical Analysis System,
More informationTechnical Paper. Using SAS Studio to Open SAS Enterprise Guide Project Files. (Experimental in SAS Studio 3.6)
Technical Paper Using SAS Studio to Open SAS Enterprise Guide Project Files (Experimental in SAS Studio 3.6) Release Information Content Version: 1.0 March 2017 Author Jennifer Jeffreys-Chen Trademarks
More informationSAS Data View and Engine Processing. Defining a SAS Data View. Advantages of SAS Data Views SAS DATA VIEWS: A VIRTUAL VIEW OF DATA
SAS DATA VIEWS: A VIRTUAL VIEW OF DATA John C. Boling SAS Institute Inc., Cary, NC Abstract The concept of a SAS data set has been extended or broadened in Version 6 of the SAS System. Two SAS file structures
More informationApril 4, SAS General Introduction
PP 105 Spring 01-02 April 4, 2002 SAS General Introduction TA: Kanda Naknoi kanda@stanford.edu Stanford University provides UNIX computing resources for its academic community on the Leland Systems, which
More informationAdding Lines in UDP. Adding Lines to Existing UDPs CHAPTER
CHAPTER 45 You can add lines to a group of existing user device profiles. When you use the template to add new lines, you cannot change phone services or speed dials. Cisco Unified Communications Manager
More informationSAS Enterprise Miner : Tutorials and Examples
SAS Enterprise Miner : Tutorials and Examples SAS Documentation February 13, 2018 The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2017. SAS Enterprise Miner : Tutorials
More informationHow to Import a Text File into Gorilla 4
Bill Good Marketing Excel: Text to Columns How to Import a Text File into Gorilla 4 The information in this article applies to: Importing a text file into the Gorilla database. Questions that apply to
More informationSAS Universal Viewer 1.3
SAS Universal Viewer 1.3 User's Guide SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2012. SAS Universal Viewer 1.3: User's Guide. Cary, NC: SAS
More informationManage Phone Books. Phone Books and Contacts
On the Phone Books tab of the Cisco Finesse administration console, you can create and manage global and team phone books and phone book contacts. Global phone books are available to all agents; team phone
More informationLab 1. Introduction to R & SAS. R is free, open-source software. Get it here:
Lab 1. Introduction to R & SAS R is free, open-source software. Get it here: http://tinyurl.com/yfet8mj for your own computer. 1.1. Using R like a calculator Open R and type these commands into the R Console
More informationHow to Import Part Numbers to Proman
How to Import Part Numbers to Proman This is a brief document that outlines how to take an Excel spreadsheet and either load new parts numbers into Proman or update data on existing part numbers. Before
More informationSorrell Associates Customized Newsletter Service ~
Sorrell Associates Customized Newsletter Service www.newsletterville.com ~ 740-824-4842 Exporting your contacts to Constant Contact. From ACT. Create a group. (Call it E-Newsletters or something like that)
More informationHooking up SAS and Excel. Colin Harris Technical Director
Hooking up SAS and Excel Colin Harris Technical Director Agenda 1. Introduction 3. Examples 2. Techniques Introduction Lot of people asking for best approach Lots of techniques cover 16 today! Only time
More informationSAS/FSP 9.2. Procedures Guide
SAS/FSP 9.2 Procedures Guide The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2008. SAS/FSP 9.2 Procedures Guide. Cary, NC: SAS Institute Inc. SAS/FSP 9.2 Procedures
More informationLearn to Impress - Hidden base SAS features. Peter Crawford Crawford Software Consultancy Limited 1 of 21
Peter Crawford Crawford Software Consultancy Limited 1 of 21 Learn hidden features in base SAS to impress colleagues Peter Crawford So many features So much to learn So much being added to SAS languages
More informationMoving Data and Results Between SAS and Microsoft Excel
SESUG 2016 ABSTRACT Paper AD-226 Moving Data and Results Between SAS and Microsoft Excel Harry Droogendyk, Stratia Consulting Inc., Lynden, ON, Canada Microsoft Excel spreadsheets are often the format
More informationSAS Certification Handout #6: Ch
SAS Certification Handout #6: Ch. 16-18 /************ Ch. 16 ******************* /* Suppose we have numeric variables ModelNumber Price Weight Change and date variable Date, plus a string variable Designer
More informationGroup Administrator. ebills csv file formatting by class level. User Guide
Group Administrator ebills csv file formatting by class level User Guide Version 1.0 February 10, 2015 Table of Content Excel automated template... 3 Enable Macro setting in Microsoft Excel... 3 Extracting
More informationMake Your Life a Little Easier: A Collection of SAS Macro Utilities. Pete Lund, Northwest Crime and Social Research, Olympia, WA
Make Your Life a Little Easier: A Collection of SAS Macro Utilities Pete Lund, Northwest Crime and Social Research, Olympia, WA ABSTRACT SAS Macros are used in a variety of ways: to automate the generation
More informationSending SAS Data Sets and Output to Microsoft Excel
SESUG Paper CC-60-2017 Sending SAS Data Sets and Output to Microsoft Excel Imelda C. Go, South Carolina Department of Education, Columbia, SC ABSTRACT For many of us, using SAS and Microsoft Excel together
More informationThe INPUT Statement: Where It
The INPUT Statement: Where It s @ Ron Cody email: ron.cody@gmail.com Author page: Support.sas.com/cody List Directed Input data list input X Y A $ Z datalines 1 2 hello 3 4 5 goodbye 6 title 'List Directed
More informationGetting Started with Dynamic Data Exchange
B 6lNNIN6 TUTORIA.LS Getting Started with Dynamic Data Exchange Howard Schreier, U.S. Department of Commerce, Washington DC Abstract There are numerous ways to move information between SAge and third-party
More informationData Import Guide DBA Software Inc.
Contents 3 Table of Contents 1 Introduction 4 2 Data Import Instructions 5 3 Data Import - Customers 10 4 Data Import - Customer Contacts 16 5 Data Import - Delivery Addresses 19 6 Data Import - Suppliers
More informationChapter 1 The DATA Step
Chapter 1 The DATA Step 1.1 Structure of SAS Programs...1-3 1.2 SAS Data Sets... 1-12 1.3 Creating a Permanent SAS Data Set... 1-18 1.4 Writing a SAS DATA Step... 1-24 1.5 Creating a DATA Step View...
More informationCreate CSV for Asset Import
Create CSV for Asset Import Assets are tangible items, equipment, or systems that have a physical presence, such as compressors, boilers, refrigeration units, transformers, trucks, cranes, etc. that are
More informationText Conversion Process
Text Conversion Process TEXT to EXCEL Conversion Template EXCEL to TEXT Purpose F. S. 285.985 - Transparency in Government Spending Data Agencies Steps 1. Get your Agency Contract Data via CD 2. Convert
More informationUpload and Go! Tired of doing data entry? Save time and increase cash flow by submitting accounts in bulk upload. Upload and Go!
Tired of doing data entry? Save time and increase cash flow by submitting accounts in bulk upload. Step 1: TIP: Make sure the file, to be uploaded, does not have any blank lines above the header line or
More informationBusiness Online TM. Positive Pay - Adding Issued Items. Quick Reference Guide
Business Online TM Positive Pay - Adding Issued Items Quick Reference Guide Positive Pay Adding Issued Items Manually or Using Templates Positive Pay is a risk management solution that provides the ability
More informationContents. Tutorials Section 1. About SAS Enterprise Guide ix About This Book xi Acknowledgments xiii
Contents About SAS Enterprise Guide ix About This Book xi Acknowledgments xiii Tutorials Section 1 Tutorial A Getting Started with SAS Enterprise Guide 3 Starting SAS Enterprise Guide 3 SAS Enterprise
More informationImproving Your Relationship with SAS Enterprise Guide Jennifer Bjurstrom, SAS Institute Inc.
ABSTRACT Paper BI06-2013 Improving Your Relationship with SAS Enterprise Guide Jennifer Bjurstrom, SAS Institute Inc. SAS Enterprise Guide has proven to be a very beneficial tool for both novice and experienced
More informationDownload Instructions
Download Instructions The download page provides several options for importing data back into your applications. The Excel template will automatically format the data within the commadelimited file. The
More informationExporting your Address Book from Despatch Manager Online & importing it into Click & Drop
Exporting your Address Book from Despatch Manager Online & importing it into Click & Drop How to export your Address Book from Despatch Manager Online (DMO) The process to export your Address Book from
More information16. Reading raw data in fixed fields. GIORGIO RUSSOLILLO - Cours de prépara)on à la cer)fica)on SAS «Base Programming» 364
16. Reading raw data in fixed fields 364 Reading raw Dataset: three solu)ons You can mix all of them! Data that SAS cannot read without further informa)on 365 Reading standard data with column input: review
More informationOne SAS To Rule Them All
SAS Global Forum 2017 ABSTRACT Paper 1042 One SAS To Rule Them All William Gui Zupko II, Federal Law Enforcement Training Centers In order to display data visually, our audience preferred Excel s compared
More information