| Creating a Single Observation from Multiple Records | |
| Lesson
Summary |
|
This page contains
To go to the page where a task, programming feature, or concept was presented, select a link.
Multiple Records per Observation
Line Pointer Controls
Reading Multiple Records in Sequential Order
Reading Multiple Records in Any Order
Combining Line Pointer Controls
|
| II. Syntax
To go to the page where a statement or option was presented, select a link. |
| LIBNAME libref 'SAS-data-library'; |
| FILENAME fileref 'filename'; |
| DATA SAS-data-set; |
| INFILE raw-data-file; |
| INPUT #n variable . . . |
| #n @n variable . . . / |
| variable . . . / |
| variable . . . ; |
| RUN; |
| PROC PRINT DATA=SAS-data-set; |
| RUN; |
|
|
III. Sample Program
libname perm 'c:\records\empdata';
filename personel 'c:\records\empdata\new.dat';
data perm.emplist3;
infile personel;
input #2 Department $ 5-16
#1 @16 ID $4. @1 Name $14. /
JobCode 3. /
Salary comma9.;
run;
proc print data=perm.emplist3;
run;
|
IV. Points to Remember
|
| |
Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.