BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rajeshV89
Fluorite | Level 6

 

ods output onewayfreqs=onefreq (drop=f_name f_sex);
proc freq data=sashelp.class;
tables name sex;
run;
ods output close;

 

here i've run the program ...

log shown like this..

 

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

 

in that onefreq dataset i don't need f_name, f_sex variables so that i used code like this...

tell me the way to avoid this warning..

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenKuhfeld
Rhodochrosite | Level 12

You could avoid the warning by dropping the variables in a subsequent data step.

 

FREQ is making the first data set based on the first tabled variable.

Then it makes the second data set based on the second tabled variable.

At this phase it reconciles the different variables in the first and send data sets and combines them into one.

At the first step, it does not know about the second part, so you get a warning.

View solution in original post

3 REPLIES 3
rajeshV89
Fluorite | Level 6

 

in this warning it mentioned f_sex only but i've given f_name and f_sex in drop option...

 

sas didn't considered f_name varaiable here?

 

but ouput dataset doesn't contains both of the variables..

WarrenKuhfeld
Rhodochrosite | Level 12

You could avoid the warning by dropping the variables in a subsequent data step.

 

FREQ is making the first data set based on the first tabled variable.

Then it makes the second data set based on the second tabled variable.

At this phase it reconciles the different variables in the first and send data sets and combines them into one.

At the first step, it does not know about the second part, so you get a warning.

rajeshV89
Fluorite | Level 6

thanks for ur answer...

 

i got to know the process the proc freq does...

 

again thanks..

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 957 views
  • 0 likes
  • 2 in conversation