Posted By

sarathannapareddy on 04/07/09


data open functions variable exists null call dataset symput VARNUM

Versions (?)

Hoe to check if the variable exsits in the dataset or not

 / Published in: SAS


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;


Report this snippet  

You need to login to post a comment.