@_maldini_ wrote:
Yes, there are formats, but I still can't figure it out. I don't understand the format for "redcap_event_name_". Thanks again for your help!
data kb_data;
set redcap;
WHERE redcap_event_name = "baseline_arm_1";
WHERE SAME AND informed_consent_hip_v_1 = "0";
WHERE SAME AND informed_consent_hip_v_0 is missing;
FORMAT
redcap_event_name $redcap_event_name_.;
/* value $redcap_event_name_ baseline_arm_1='baseline' fu_1_arm_1='fu_1' fu_2_arm_1='fu_2'; */
informed_consent_hip_v_1 informed_consent_hip_v_1_.;
/* value informed_consent_hip_v_1_ 0='Incomplete' 1='Unverified' 2='Complete'; */
/* informed_consent_hip_v_0 does not have a format */
run;

Your error messages are because the variable you are using is numeric and you compare it to a character value. When you place digits inside quotes you are intending a CHARACTER comparison. Try = 0;
The second error is because the semicolon after
redcap_event_name $redcap_event_name_.;
ends the Format statement. Remove the ; there and the error should go away.
In future when posting LOG information it is better to copy the log text for the entire procedure or data step, open a text box using the </> and paste the text.
It is very hard to deal with pictures of text. Can't copy/paste, make corrections or such.