I have a very big data set on a secure server, hence I can not copy paste codes og logs.
I have no been spending days trying to apply on my predefined codes. so What i did so far:
libname fmt "path...";
options fmtsearch=(fmt.uddannelser fmt.diced);
proc format;
value audd_niveau_L1L2_KT
0="90 uoplyst"
1="10 grundskole"
....goes on for several 100 lines.....;
run;
data udda1
set udda;
format hfaudd default= audd_niveau_L1L2_Kt;
run;
but it do not work what do I do?
Look at the log (Maxim 2). The FORMAT statement does not need an equal sign, and actually rejects it.
PS get an account on SAS on Demand for Academics. There you can recreate code that causes problems and copy/paste code and logs without restrictions.
The only thing I see wrong is in the FORMAT statement.
The syntax of the format statement is:
FORMAT variablename formatname. ;
Note, there must be a dot at the end of the formatname. There is no equal sign.
If you fix that and it still doesn't work, show us the LOG of this DATA step so we can see both your code that is being used and the exact ERROR message. Do not chop out parts of the LOG for this DATA step, we need to see it verbatim, copied as text and pasted into the window that appears when you click on the </> icon. This preserves the formatting and makes the log more readable — do not provide the log any other way.
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.