/ Published in: SAS
URL: http://studysas.blogspot.com/2009/04/how-to-check-if-variable-exists-in-sas.html
In SAS sometimes, we need to check whether the variable is exist in the dataset or not, we usually run the proc contents program and physically check if the variable exist in the dataset or not.
If we want to check it programmatically, then use the following code....
Sample dataset:...
data null; dset=open('old'); check=varnum(dset,'SCORE4'); call symput('chk',check); run;
%put &chk;
Expand |
Embed | Plain Text
www.studysas.blogspot.com
You need to login to post a comment.
