DATA Step, Macro, Functions and more

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

Reply
Contributor
Posts: 68

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: 279

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

Posted in reply to Ritesh_dellvostro

Can you post your code related to this data step?

Super Contributor
Posts: 266

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

[ Edited ]
Posted in reply to Ritesh_dellvostro

 

 

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,116

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

Posted in reply to Ritesh_dellvostro

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: 10,035

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

Posted in reply to Ritesh_dellvostro

You can suppress these warning message by :

 

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