@Reeza If you include a LENGTH statement, and an INFORMAT and FORMAT statements, where do you assign these attributes? Is it the first time the varaible is presented to SAS? For example, if I do not include a certain variable (e.g. Time) in the LENGTH statement, SAS skips over it and it is absent in a PROC PRINT.
For example:
DATA test1;
LENGTH name $10 id 3;
INFORMAT time TIME10.;
*FORMAT time TIME8.;
INPUT time name id;
DATALINES;
11:00PM Jamie 211
9:00PM Bob 322
12:30 Ron 333
2:00AM Joe 111
;
RUN;
However, if I include it in the LENGTH statement, as a character variable, and then assign an informat in an INFORMAT statement, the log states: "NOTE 485-185: Informat $TIME was not found or could not be loaded."
DATA test1;
LENGTH time $8 name $10 id 3;
INFORMAT time TIME10.;
*FORMAT time TIME8.;
INPUT time name id;
DATALINES;
11:00PM Jamie 211
9:00PM Bob 322
12:30 Ron 333
2:00AM Joe 111
;
RUN;
What am I doing wrong here? Thanks!
... View more