Creating a Single Observation from Multiple Records | |
Line Pointer
Controls |
You know that as SAS software reads raw data values, it keeps track of its position with an input pointer. You have used column pointer controls and column specifications to determine the column placement of the input pointer. |
Column Specifications |
input Name $ 1-12 Age 15-16 Gender $ 18; |
Column Pointer Controls |
input Name $12. @15 Age 2. @18 Gender $1.; |
But you can also position the input pointer on a specific record by using
a line pointer control in the INPUT statement.
input #2 Name $ 1-12 Age 15-16 Gender $ 18; |
Raw Data File Admit
1---+----10---+----
S. Thompson 37 M
L. Rochester 31 F
M. Sabatello 43 M
There are two basic types of line pointer controls.
First we'll take a look at the forward slash (/). Later in the lesson, you'll learn how to use the #n and see how these two controls can be combined. |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.