SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating a Single Observation from Multiple Records
Reading Multiple Records in Sequential Order


The Forward Slash (/) Line Pointer Control

You use the forward slash (/) line pointer control to read multiple records in sequential order. The / advances the input pointer to the next record. The / line pointer control only advances the input pointer forward and must be specified after the instructions for reading the values in the current record.

The single INPUT statement below reads the values for Lname and Fname in the first record, followed by the values for Department and JobCode in the second record. Then the value for Salary is read in the third record.



input Lname $ 1-8 Fname $ 10-15 /
      Department $ 1-12 JobCode $ 15-19 / 
      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  



back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement