Hi
Below is the code and a note from the log file while executing this code.
Why does SAS think first.usubjid is a varible by itself.
Please advise how to get rid of this note from the log file or an alternate to this code.
230 data mh_fin;
231 set mh mh_test4;
232
233 if first.usubjid then MHSEQ=1;
234 else MHSEQ+1;
235
236 run;
NOTE: Variable first.usubjid is uninitialized.
Thank you
Hi @bharath86,
Have you tried using a by statement with the variable usubjid after the set statement?
Kind regards,
Amir.
Hi @bharath86,
Have you tried using a by statement with the variable usubjid after the set statement?
Kind regards,
Amir.
Hey,
Thanks for raising that by statement.
I actually revised the code and changed the variable.
data mh_fin;
set mh mh_test4;
by studyid;
if first.studyid then MHSEQ=1;
else MHSEQ+1;
run;
Thank you that helps.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.