BookmarkSubscribeRSS Feed
zhuxiaoyan1
Quartz | Level 8

After I split a column with SAS Enterprise Guide, I got a warning sign. It said : "

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

". This dose not make sence to me. Although It dose not affect my results, but my boss is concerned about this warning. Can anybody explain this? Thank you in advance!

5 REPLIES 5
Reeza
Super User

You need to check your code. Specifically the DROP KEEP RENAME statement for something that's probably a typo. One way to check is to remove each one in turn and see which generates the error.

 

Are you using code or the GUI?

If GUI check the generated code for issues.

zhuxiaoyan1
Quartz | Level 8

This is the code generated by Enterprise itself.

 

%_eg_conditional_dropds(WORK.TRNSSPLITCOLUMNSQUERY_FOR_C_0001,

WORK.TMP0TempTableInput,

WORK.TMP1TempLabelText);

/* -------------------------------------------------------------------

Sort data set WORK.QUERY_FOR_COM_AVG_AMT_000B

------------------------------------------------------------------- */

PROC SORT

DATA=WORK.QUERY_FOR_COM_AVG_AMT_000B(KEEP=Avg_Allowed EPI_FIN_YEAR EPI_TYPE_KEY WAVE)

OUT=WORK.TMP0TempTableInput

;

BY EPI_TYPE_KEY WAVE;

RUN;

/* -------------------------------------------------------------------

To prevent log warnings, only process the EG_LABEL statement when necessary.

------------------------------------------------------------------- */

%LET __EG_DROP_LABEL__=;

%LET __EG_LABEL_OPT__=;

PROC CONTENTS DATA=WORK.QUERY_FOR_COM_AVG_AMT_000B OUT=WORK.TMP1TempLabelText(KEEP=LABEL) NOPRINT;

RUN;

DATA _NULL_;

SET WORK.TMP1TempLabelText(WHERE=(LABEL NE ""));

CALL SYMPUT("__EG_DROP_LABEL__", "__EG_LABEL__");

CALL SYMPUT("__EG_LABEL_OPT__", "LABEL=__EG_LABEL__");

STOP;

RUN;

PROC TRANSPOSE DATA=WORK.TMP0TempTableInput

OUT=WORK.TRNSSPLITCOLUMNSQUERY_FOR_C_0001(LABEL="Split WORK.QUERY_FOR_COM_AVG_AMT_000B"

DROP=__EG_TYPE__ &__EG_DROP_LABEL__ )

NAME=__EG_TYPE__

&__EG_LABEL_OPT__

;

BY EPI_TYPE_KEY WAVE;

ID EPI_FIN_YEAR;

VAR Avg_Allowed;

/* -------------------------------------------------------------------

End of task code.

------------------------------------------------------------------- */

RUN; QUIT;

%_eg_conditional_dropds(WORK.TMP0TempTableInput,

WORK.TMP1TempLabelText);

TITLE; FOOTNOTE;

 

The warning "

The variable __EG_LABEL__ in the DROP, KEEP, or RENAME list has never been referenced.

" just did not make any sense to me.

 

 

Reeza
Super User

This line is likely your issue:

 

NAME=__EG_TYPE__

&__EG_LABEL_OPT__

 

as the macro variable resolves to the one in your error. 

 

 

zhuxiaoyan1
Quartz | Level 8

I'm still working on this. After I figure out the answer I'm satified, I'll post the update.

Raina_K
Calcite | Level 5

I am also having this warning pop up. I know that it isn't affecting my result, but it is bothersome. I notice in the code that it says "To prevent log warnings, only process the EG_LABEL statement when necessary." Is there a way to tell it to not process those statements because it isn't neccessary in my situation.

 

Is my best option to just turn it into code and remove those parts?

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 5 replies
  • 2248 views
  • 0 likes
  • 3 in conversation