- Typing the variable names and column numbers for ten fields is tolerable. But consider the magnitude of the task if there were 100 or 1,000 items. Boring! And more importantly, the more things you have to code, the more possibility that you'll make a mistake. Usually, simpler is better.
- Why use column input anyway? Using informats probably make more sense, especially if there is any chance that the record layout may change in the future (and there always is that chance). Consider all the work you'd have to go to to change the above input statement if someone decided to make Q5 a 2-character field.
- Just a thought: Isn't there a way to abbreviate a series of variable names?
DATA SHORTWAY;
INPUT ID 1-3
@4 (Q1-Q5)(1.)
@9 (Q6-Q10 HEIGHT AGE)(2.);
DATALINES;
There are two main things to notice: the use of variable abbreviations and the pairing of variables and informats in parentheses.