Desktop productivity for business analysts and programmers

Split column with SAS Enterprise

Reply
Contributor
Posts: 65

Split column with SAS Enterprise

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!

Grand Advisor
Posts: 17,332

Re: Split column with SAS Enterprise

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.

Contributor
Posts: 65

Re: Split column with SAS Enterprise

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.

 

 

Grand Advisor
Posts: 17,332

Re: Split column with SAS Enterprise

This line is likely your issue:

 

NAME=__EG_TYPE__

&__EG_LABEL_OPT__

 

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

 

 

Contributor
Posts: 65

Re: Split column with SAS Enterprise

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

Established User
Posts: 1

Re: Split column with SAS Enterprise

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?

Ask a Question
Discussion stats
  • 5 replies
  • 296 views
  • 0 likes
  • 3 in conversation