Identifying the Type of Numeric Data

Overview

Raw data can be organized in several ways. External files can contain data that is arranged in columns or fixed fields. It is possible to specify a beginning and ending column for each field.
However, the following file contains nonstandard data, because one of the variable’s values includes a special character, the dollar sign ($).
Figure 17.1 Raw Data File (Nonstandard)
Raw Data File
The following external file contains no special characters, but its data is free-format, meaning that it is not arranged in columns. Notice that the values for a particular field do not begin and end in the same column.
Figure 17.2 Raw Data File (Free-Format)
Raw Data File
How your data is organized and what type of data you have determine which input style you should use to read the data. SAS provides you three primary input styles: column input, formatted input, and list input. Recall from Creating SAS Data Sets from External Files that column input can be used to read raw data that is stored in an external file. This chapter covers how to use column input and formatted input to read standard and nonstandard data arranged in fixed fields.

Standard Numeric Data

Standard numeric data values can contain only the following:
  • numbers
  • decimal points
  • numbers in scientific, or E, notation (23E4)
  • minus signs and plus signs
Some examples of standard numeric data are 15, -15, 15.4, +.05, 1.54E3, and -1.54E-3.

Nonstandard Numeric Data

Here are some types of nonstandard numeric data:
  • values that contain special characters, such as percent signs (%), dollar signs ($), and commas (,)
  • date and time values
  • data in fraction, integer binary, real binary, and hexadecimal forms
Last updated: January 10, 2018
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.200.3