SAS processing
is the way that the SAS language reads and transforms input data and generates the kind of output that you request. The DATA step and the procedure (PROC) step are the two steps in the SAS language. Generally, the DATA step manipulates data, and the PROC step analyzes data, produces output, or
The following figure shows a high level view of SAS processing using a DATA step and a PROC step. The figure focuses primarily on the DATA step.
Figure 2.1:
SAS Processing
You can use different types of data as input to a DATA step. The DATA step is
You can use different sources of input data in your SAS program:
|
SAS data sets |
can be one of two types: |
|
|
SAS data files |
store actual data values. A SAS data file consists of a descriptor portion that describes the data in the file, and a data portion. |
|
|
SAS data views |
contain references to data stored elsewhere. A SAS data view uses descriptor information and data from other files. It allow you to dynamically combine data from various sources, without using storage space to create a new data set. Data views consist of DATA step views, PROC SQL views, and SAS/ACCESS views. In most cases, you can use a SAS data view as if it were a SAS data file. |
|
|
For more information, see Chapter 28, 'SAS Data Files,' on page 487, and Chapter 29, 'SAS Data Views,' on page 539. |
||
|
Raw data |
specifies unprocessed data that have not been read into a SAS data set. You can read raw data from two sources: |
|
|
External files |
contain records comprised of formatted data (data are arranged in columns) or free-formatted data (data that are not arranged in
|
|
|
Instream data |
is data included in your program. You use the DATALINES statement at the beginning of your data to identify the instream data. |
|
|
For more information about raw data, see Chapter 21, 'Reading Raw Data,' on page 357. |
||
|
Remote access |
allows you to read input data from nontraditional sources such as a TCP/IP socket or a URL. SAS treats this data as if it were coming from an external file. SAS allows you to access your input data remotely in the following ways: |
|
|
SAS catalog |
specifies the access method that enables you to reference a SAS catalog as an external file. |
|
|
FTP |
specifies the access method that enables you to use File Transfer Protocol (FTP) to read from or write to a file from any host machine that is connected to a network with an FTP server running. |
|
|
TCP/IP socket |
specifies the access method that enables you to read from or write to a Transmission Control Protocol/Internet Protocol (TCP/IP) socket. |
|
|
URL |
specifies the access method that enables you to use the Universal Resource Locator (URL) to read from and write to a file from any host machine that is connected to a network with a URL server running. |
|
|
For more information about accessing data remotely, see FILENAME, CATALOG Access Method; FILENAME, FTP Access Method; FILENAME, SOCKET Access Method; and FILENAME, URL Access Method statements in the Statements section of SAS Language Reference: Dictionary . |
||