Hi,
Instead of attaching the format to the dataset, you can create a variable with the format.
Eg:
data one;
input id flag;
cards
0001 1
0002 0
0003 1
0004 1
0005 0
;
run;
proc format;
value flagvar 0 = 'Absent'
1 = 'Present';
run;
Instead of doing the following
data two;
set one;
format flag flagvar.;
run;
Why not do this
data two;
set one;
flag1 = put(flag, flagvar.);
run;
This way the values are created with the formatted values.
There are more advanced way of dealing with it, like attaching some format catalogs and so on. But, I prefer this. Less hassle.
Regardz,
Sandhya.
... View more