Chapter 3: The Operating System

Introduction

Checking the Operating System

Running Operating System Commands

Using the X Statement

Using the SYSTEM() Function

Using a FILENAME Pipe

Working with the File System

Creating and Deleting Directories

Working with Files

Reading and Writing External Files

Using the $VARYING. Format and Informat

Using the FILEVAR= Option

Reading Date and Time Values

Creating a CSV File from a Data Table

Reading a CSV File with Embedded Line Feeds

Introduction

In a SAS program, you sometimes need to access the operating system (OS) to run system commands and to access the file system. Reading data from external files is usually a requirement in a SAS application; you have to get the data into tables before you can analyze ...

Get Practical and Efficient SAS Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.