Brief description  about Online courses   join in Online courses

Reading Raw Data into SAS

Arvind  Agarwal
Arvind Agarwal
Business Analyst

SAS is a system used by many companies for data analysis.

Since it deals with data so it is very important to import data to SAS system for

further analysis.

One way to provide SAS with data is to have SAS read the data from a text file and

create a SAS data set. SAS has different ways of reading data from text files and, depending on how the data values are arranged , you can choose an input method that is most convenient. You have already seen one method, called list input , that was used in the introductory program in previous tutorial chapter.

This chapter discusses list input as well as two other methods that are appropriate for data arranged in fixed columns.

What is Raw Data –

Raw data is unprocessed data that has not been read into a SAS data set. You can use a

DATA step to read raw data into a SAS data set from two sources:

  • Instream data -. passing data in the sas program itself .Most of the times we use this  approach to create some dummy or test data.
  • External file – Reading data from some external files.

Note: Raw data does not include Database Management System (DBMS) files. You

must license SAS/ACCESS software to access data stored in DBMS files.


3.2.1 Data values    -  are character or numeric values.

3.2.2 Numeric value  - contains only numbers, and sometimes a decimal point, a minus sign, or both. When they are read into a SAS data set, numeric values are stored in the

floating-point format native to the operating environment. Nonstandard numeric

values can contain other characters as numbers; you can use formatted input to

enable SAS to read them.

3.2.3 Character value   -  is a sequence of characters.

3.2.4 Standard data    -  are character or numeric values that can be read with list, column, formatted, or named input.

3.2.5 Nonstandard data    - is data that can be read only with the aid of informats.

Examples of nonstandard data include numeric values that contain commas, dollar signs, or blanks; date and time values; and hexadecimal and binary values.

3.2.6 Numeric Data   -

Numeric data can be represented in several ways. SAS can read standard numeric

values without any special instructions. To read nonstandard values, SAS requires

special instructions in the form of informats. Below Table shows standard,

nonstandard, and invalid numeric data values and the special tools, if any, that are

required to read them.

Write your comment now