Untested, because you didn't post test data. If you want the NOTES variable to have, say a pipe-delimited list of all the missing value notes that apply for a record, you could play with stuff like:
if missing(student_id) then notes=catx("|",notes,"Student ID Missing") ;
if missing(session_startdt) then notes=catx("|",notes,"Session Start Date Missing") ;
Or if you want more "human readable" it could be an AND-delimited list:
if missing(student_id) then notes=catx(" and ",notes,"Student ID Missing");
if missing(session_startdt) then notes=catx(" and ",notes,"Session Start Date Missing");
If you've got a lot of these, you could use an array, and if the variables have labels you could use the label to generate the text for the note, rather than hard-coding it.
... View more