backnextLearning Path
   


Introduction

Information for one observation can be spread out over several records. You can write multiple INPUT statements to read each record that comprises a single observation . . .



input Lname $ 1-8 Fname $ 10-15;
input Department $ 1-12 JobCode $ 15-19;
input Salary comma10.;
1---+----10---+---- 
ABRAMS   THOMAS 
MARKETING     SR01
$25,209.03  
BARCLAY  ROBERT 
EDUCATION     IN01
$24,435.71  
COURTNEY MARK 
PUBLICATIONS  TW01
$24,006.16  


. . . or, you can write one INPUT statement that contains a line pointer control to specify the record(s) from which values are to be read.



input #1 Lname $ 1-8 Fname $ 10-15 
      #2 Department $ 1-12 JobCode $ 15-19 
      #3 Salary comma10.;
1---+----10---+---- 
ABRAMS   THOMAS 
MARKETING     SR01
$25,209.03  
BARCLAY  ROBERT 
EDUCATION     IN01
$24,435.71  
COURTNEY MARK 
PUBLICATIONS  TW01
$24,006.16  


Notice:

Setting Up Filerefs for Practices in This Lesson




Time to Complete

This lesson contains pages and takes approximately 30 minutes to complete.



Objectives

In this lesson, you learn to

  • read multiple records sequentially and create a single observation
  • read multiple records non-sequentially and create a single observation.

Prerequisites

Before taking this lesson, you should complete the following lessons:

  • .

  Copyright © 2003 SAS Institute Inc., Cary, NC, USA. All rights reserved.
Terms of Use & Legal Information | Privacy Statement
backnext