Chapter Contents

Previous

Next
SAS Component Language: Reference

Introduction

In addition to using SCL to manipulate SAS tables, you can use it to manipulate external files. External files are files that are created and maintained on a host operating system (for example, files that you have created with your system editor or files in which you have stored the output of SAS procedures). They have different internal formats than SAS files.

When you use external files to store data or other information, you can use SCL functions to read, update, and write information to new files, and to perform utility operations on existing files. These functions enable you to create SCL programs that do the following:

Note:   Your operating system maintains groups of external files in an aggregate storage location, which this book calls a directory. However, your operating system may identify these locations with different names (for example, folder, subdirectory, partitioned data set, or MACLIB). If you need more information, see the SAS documentation for your operating environment.  [cautionend]

Ordinarily, you must use a logical name called a fileref to identify the location of an external file to SAS software. SCL allows you to assign a fileref to a directory and then to open and perform operations on as many of its files as the program requires.

Many functions that perform external file operations return a SAS system return code, called sysrc. SAS System Return Codes contains a list of return codes with a section for operations that are commonly performed on external files. You can check for these codes to write more sophisticated error checking for your SCL programs.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.