race_all=3 gender=2 htn_meds=1 smk_status=1 ever_told_dm2=1 age_yrs=40 cauc_f_age=. cauc_f_age_sq=. cauc_f_tchol=.
cauc_f_age_x_tchol=. cauc_f_hdl=. cauc_f_sbp_tx=. cauc_f_smk=. cauc_f_age_x_smk=. cauc_f_ever_told_dm2=. ind_sum_cauc_f=.
mean_cauc_f=. bline_surv_fcauc=. ascvd_score_cauc_f=.
cauc_f_age is set to missing despite that fact that the variable used in its calculation is NOT missing (i.e., age_yrs).
I assume you have highlighted this because you think this indicates a problem. This log output is printed from your PUT statements at the start of the data step, before cauc_f_age is assigned a value. So of course, cauc_f_age is always missing in your PUT statements. Later on, cauc_f_age does indeed get assigned a value for each observation and this value appears in the output data set. So you are looking in the wrong place. Or, if you repeat your PUT statements at the end of the data step, you will see that cauc_f_age is indeed assigned a value.
Others have pointed out the problem that tchol_mg doesn't exist, so all variables computed from it will be missing.
Another suggestion, if I am understanding this properly, is that you are creating variables whose variable name contains cauc_f and presumably there will be a cauc_m and others. This is a poor design for variable names and for the data set. Information, such as gender or race, that can vary from observation, should be indicated by variables which you already have, rather than in the name of the variable. Cauc_f_age should just be age, and there should be a value regardless of whether the observation is cauc and regardless of whether the observation is F. This is a much better design of a data set, and will lead to much easier programming.
--
Paige Miller