Reputation: 617
data test;
input country $8. date mmddyy10.;
cards;
Germany 12/31/2000
France 01/31/2001
;
run;
In the 2nd line, can I use input country $8. date : mmddyy10.;
?
What's the difference between them?
Upvotes: 1
Views: 139
Reputation: 2174
The colon will cause input statement to read from the first non-blank character on the line. Compare the next two data steps. The first will return a missing date for Germany, the second will contain 12/31/2000.
data test1;
input country $8. date mmddyy10.;
cards;
Germany 12/31/2000
France 01/31/2001
;
run;
data test2;
input country $8. date : mmddyy10.;
cards;
Germany 12/31/2000
France 01/31/2001
;
run;
Upvotes: 3