SAS® Access to External Files and Databases 

While working directly with SAS® dataset is preferred, there may be times when you need to process raw text files or large databases. Creating a SAS Table from a CSV File Video

See these SAS® papers to learn how best to access these files.  See also DATA Step and Merge, Proc SQLProc Import, Excel filesProc PRINTTO syntax, ETL and SAS Enterprise Guide.

Useful SAS Options for reading difficult raw data - SAS Paper

______________________________________________

SAS® SyntaxINFILEINPUT

 Beginner SAS Programmer


Beginner Paper Easy Come, Easy Go undefined Interactions between the DATA Step and External Files, Andrew T. Kuligowski [Filename]

Read Difficult Raw data Paper Reading MORE Difficult Raw Data, Matthew Cohen [Non-standard quotes]

 

 Advanced SAS Programmer


General Input Methods Paper Basic Methods to Introduce External Data into the SAS® System, Andrew Kuligowski, Nancy Roberts
(Infile, DDE, OLE, ODBC, SAS/Access Engines)

 

______________________________________________

1. The SAS INFILE and FILE Statements, Steven First [Filename]

2. The Input Statement: Where It's @, Ronald Cody

3. Advanced Methods to Introduce External Data into the SAS System, Andrew Kuligowski

4. Use Your Website to Document your Website, Karen Wyland 
(Use PIPE option within FILENAME statement to run DOS command for creating a text file)

5. The Path, The Whole Path, And Nothing But the Path, So Help Me Windows, Art Carpenter

6. De-Mystifying the SAS® LIBNAME Engine in Microsoft Excel: A Practical Guide
Paul Choate, Carol Martell
 [ACCESS=READONLY]

7. Using the SAS/ACCESS Libname Technology to Get Improvements in Performance and Optimizations in SAS/SQL Queries, Fred Levine

8. A Process for Automatically Retrieving Database Using ODBC and SAS/ACCESS SQL Procedure Pass-Through Facility, Leiming Li

9. PROC IMPORT with a Twist, Gary McQuown

10. Database Access Using the SAS System, Frederick Pratter

11. The SAS Data Step: Where Your Input Matters, Peter Eberhardt

12. Can you read this into SAS® for me? “Using INFILE and INPUT to Load Data Into SAS®, Peter Eberhardt, Audrey Yeo

13. Getting SAS® to Play Nice With Others: Connecting SAS® to Microsoft SQL Server Using an ODBC Connection, Candice Riley

14. Automatic Data File Retrieval from Different Database Engines, Xin Zhang, Chuanchieh Hsu

15. More _Infile_ Magic, Peter Crawford

16. What Every SAS® Programmer Should Know: Importing Files, Renato Villacorte

17. Using ODS EXCEL to Integrate Tables, Graphics, and Text into Multi-Tabbed Microsoft Excel Reports, Caroline Walker

18. New for SAS® 9.4: Including Text and Graphics in Your Microsoft Excel Workbooks, Part 2, Vincent DelGobbo

19. Reading and Processing the Contents of a Directory, Ben Cochran [DOPEN]

20. Multiple File Processing with SAS, Kevin McGowan [DOPEN]

21. Show Me the Folder, Brandon Barrett, Binoy Varghese [DOPEN]

22. Getting Data into SAS®: INFILE and INPUT, Andrew Kuligowski

23. Reading an Excel Spreadsheet with Cells Containing Line Endings, Larry Hoyle

24. Unpacking an Excel Cell: Dealing with Multi-Line Excel Cells in SAS, Lucheng Shao

25. Preserving Line Breaks When Exporting to Excel, Nelson Lee

26. Let SAS “Modify” Your Excel File, Nelson Lee

27. Essentials of the Program Data Vector (PDV): Directing the Aim to Understanding the DATA Step!, Arthur Li

28. MISSOVER, TRUNCOVER, and PAD, OH MY!! or Making Sense of the INFILE and INPUT Statements, Randall Cates

Powered by Wild Apricot Membership Software