SAS Training Institute In Delhi

 Reading Variables from Multiple Records in Any Order

 You can read multiple records to create a single observation by pointing to a specific record in a set of input records with the #n line-pointer control. As you saw in the last section, the advantage of using the / line-pointer control over multiple INPUT statements is that it requires fewer statements. 

However, using the #n line-pointer control enables you to read the variables in any order, no matter which record contains the data values. It is also useful if you want to skip data lines.

 example uses one INPUT statement to read multiple data lines in a different order: 

data club2;

 input #2 Team $ 1-6 #1 Name $ 6-23 IdNumber 1-4

    #3 StartWeight 1-3 EndWeight 5-7;

 datalines;

 1023 David Shaw

 red 

189 165 

1049 Amelia Serrano yellow

 145 124 1219

 Alan Nance

 red

 210 192

 1246 Ravi Sinha

 yellow

 194 177 

1078 Ashley McKnight

 red

 127 118

 1221 Jim Brown 

yellow

 220 .

    ;


 proc print data=club2

Comments

Popular posts from this blog

AutoCAD training institute in Delhi-Education eats the competition.

C++ Training in Delhi-A Education Is Forever.

Software Testing institute in Delhi