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
;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.