DATA Step, Macro, Functions and more

WARNING: The variable in the DROP, KEEP, or RENAME list has never been referenced

Reply
Contributor
Posts: 63

WARNING: The variable in the DROP, KEEP, or RENAME list has never been referenced

hello all,

 

I am getting a warning in some code:

WARNING: The variable in the DROP, KEEP, or RENAME list has never been referenced

 

Can any one tell me, what can be the scenario of this warning?

Super Contributor
Posts: 268

Re: WARNING: The variable in the DROP, KEEP, or RENAME list has never been referenced

Can you post your code related to this data step?

Regular Contributor
Posts: 241

Re: WARNING: The variable in the DROP, KEEP, or RENAME list has never been referenced

[ Edited ]

 

 

In your output dataset, you have mentioned variable name that is not present in your input dataset.

One example mentioned below, weight,  age2 and height variable not present in input dataset.

 

data temp ( keep = weight drop=age2 rename = (height=ht));

set sashelp.class(keep = age );

run;

Trusted Advisor
Posts: 2,113

Re: WARNING: The variable in the DROP, KEEP, or RENAME list has never been referenced

Most often, I have seen that hapen when I have a typo in a varaible name.

 

The second most often time I see it is when I am accessing a replacement data set (e.g. monthly processing) and the underlying input dataset has changed.  Excel is a frequent culprit.

Super User
Posts: 9,682

Re: WARNING: The variable in the DROP, KEEP, or RENAME list has never been referenced

You can suppress these warning message by :

 

options dkricond=nowarning dkrocond=nowarning ;
Ask a Question
Discussion stats
  • 4 replies
  • 972 views
  • 3 likes
  • 5 in conversation