I have a question about something I must have forgotten...
Why does test1 fail, but not test2 or test3?
data test1;
informat d date9.;
input d 1-9;
datalines;
01JAN1999
;
data test2;
length dTxt $9;
input dTxt 1-9;
d = input (dTxt, date9.);
datalines;
01JAN1999
;
data test3;
input d :date9.;
datalines;
01JAN1999
;
PG
According to the documentation:
Note: You cannot use an informat with column input.
According to the documentation:
Note: You cannot use an informat with column input.
That settles that! Thanks.
PG
Use @.
data test1b;
informat d date9.;
format d date9.;
input @1 d ;
put d=;
datalines;
01JAN1999
;
data test1c;
format d date9.;
input @1 d date9.;
put d=;
datalines;
01JAN1999
;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: