Mixing Styles of Input
An Example of Mixed Input
When you begin an INPUT statement in a particular style
(list, column, or formatted), you are not restricted to using that
style alone. You can mix input styles in a single INPUT statement
as long as you mix them in a way that appropriately describes the
raw data records. For example, this DATA step uses all three input
styles:
data club1;input IdNumber
1Name $18.
2Team $ 25-30
3StartWeight EndWeight;
datalines;1 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=club1; title 'Weight Club Members'; run;
The following list corresponds to the ...
Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.