Warning: Apparent symbolic reference not resolved?

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Warning: Apparent symbolic reference not resolved?

 

The  following SAS9.3 code in macro:

 

  /* A few extreme values of could distort graphical output.
    Comparisons are made in succession from highest to next higher
    value for the top 5 extreme values. If the highest value is larger than
    twice the next higher value, then the highest value will be left out
    of the graph by assigning Rmax to the next higher value. Rmax  
    specifies the maximum value of the graphical axis line
    (xaxis or yaxis). */
 ods select ExtremeValues;
 Proc Univariate Data=&InDat NExtrVal=5;
 	Var &RType;
	ods output ExtremeValues = ExtremeValues;
 Run;
 options mprint mlogic symbolgen;
 Data _Null_;
   Set ExtremeValues;
   If _N_ = 1 Then Call Symputx('High5',High);
   If _N_ = 2 Then Call Symputx('High4',High); 
   If _N_ = 3 Then Call Symputx('High3',High); 
   If _N_ = 4 Then Call Symputx('High2',High); 
   If _N_ = 5 Then Call Symputx('High1',High);
 Run;
 %Do I = 1 %To 4;
   	%If %Sysevalf(&&High&I/&&High%Eval(&I+1)) > 1.3 %Then %Let RMax = %Sysevalf(&&High%Eval(&I+1),ceil);
 %End;
 options nomprint nomlogic nosymbolgen;

It produces the correct value of RMax but there are log warnings:

 

MPRINT(NEGBININF):   symbolgen;
MPRINT(NEGBININF):   Data _Null_;
MPRINT(NEGBININF):   Set ExtremeValues;
MPRINT(NEGBININF):   If _N_ = 1 Then Call Symputx('High5',High);
MPRINT(NEGBININF):   If _N_ = 2 Then Call Symputx('High4',High);
MPRINT(NEGBININF):   If _N_ = 3 Then Call Symputx('High3',High);
MPRINT(NEGBININF):   If _N_ = 4 Then Call Symputx('High2',High);
MPRINT(NEGBININF):   If _N_ = 5 Then Call Symputx('High1',High);
MPRINT(NEGBININF):   Run;

NOTE: There were 5 observations read from the data set WORK.EXTREMEVALUES.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


MLOGIC(NEGBININF):  %DO loop beginning; index variable I; start value is 1; stop value is 4; by
      value is 1.
SYMBOLGEN:  && resolves to &.
SYMBOLGEN:  Macro variable I resolves to 1
SYMBOLGEN:  Macro variable HIGH1 resolves to 122.34597475
SYMBOLGEN:  && resolves to &.
WARNING: Apparent symbolic reference HIGH not resolved.
SYMBOLGEN:  Macro variable I resolves to 1
SYMBOLGEN:  Macro variable HIGH2 resolves to 104.85413396
MLOGIC(NEGBININF):  %IF condition %Sysevalf(&&High&I/&&High%Eval(&I+1)) > 1.3 is FALSE
MLOGIC(NEGBININF):  %DO loop index variable I is now 2; loop will iterate again.
SYMBOLGEN:  && resolves to &.
SYMBOLGEN:  Macro variable I resolves to 2
SYMBOLGEN:  Macro variable HIGH2 resolves to 104.85413396
SYMBOLGEN:  && resolves to &.
WARNING: Apparent symbolic reference HIGH not resolved.
SYMBOLGEN:  Macro variable I resolves to 2
SYMBOLGEN:  Macro variable HIGH3 resolves to 77.716058462
MLOGIC(NEGBININF):  %IF condition %Sysevalf(&&High&I/&&High%Eval(&I+1)) > 1.3 is TRUE
MLOGIC(NEGBININF):  %LET (variable name is RMAX)
SYMBOLGEN:  && resolves to &.
WARNING: Apparent symbolic reference HIGH not resolved.
SYMBOLGEN:  Macro variable I resolves to 2
SYMBOLGEN:  Macro variable HIGH3 resolves to 77.716058462
MLOGIC(NEGBININF):  %DO loop index variable I is now 3; loop will iterate again.
SYMBOLGEN:  && resolves to &.
SYMBOLGEN:  Macro variable I resolves to 3
SYMBOLGEN:  Macro variable HIGH3 resolves to 77.716058462
SYMBOLGEN:  && resolves to &.
WARNING: Apparent symbolic reference HIGH not resolved.
SYMBOLGEN:  Macro variable I resolves to 3
SYMBOLGEN:  Macro variable HIGH4 resolves to 75.249510073
MLOGIC(NEGBININF):  %IF condition %Sysevalf(&&High&I/&&High%Eval(&I+1)) > 1.3 is FALSE
MLOGIC(NEGBININF):  %DO loop index variable I is now 4; loop will iterate again.
SYMBOLGEN:  && resolves to &.
SYMBOLGEN:  Macro variable I resolves to 4
SYMBOLGEN:  Macro variable HIGH4 resolves to 75.249510073
SYMBOLGEN:  && resolves to &.
WARNING: Apparent symbolic reference HIGH not resolved.
SYMBOLGEN:  Macro variable I resolves to 4
SYMBOLGEN:  Macro variable HIGH5 resolves to 59.803347257
MLOGIC(NEGBININF):  %IF condition %Sysevalf(&&High&I/&&High%Eval(&I+1)) > 1.3 is FALSE
MLOGIC(NEGBININF):  %DO loop index variable I is now 5; loop will not iterate again.
MPRINT(NEGBININF):   options nomprint nomlogic
NOTE: Overwriting existing template/link: Sgdesign
NOTE: STATGRAPH 'Sgdesign' has been saved to: SASUSER.TEMPLAT
NOTE: PROCEDURE TEMPLATE used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

Appearing to provide a warning for the line

 

%If %Sysevalf(&&High&I/&&High%Eval(&I+1)) > 1.3 %Then %Let RMax = %Sysevalf(&&High%Eval(&I+1),ceil);
 

 Why?

 

 


Accepted Solutions
Solution
‎10-16-2017 03:06 PM
New Contributor
Posts: 2

Re: Warning: Apparent symbolic reference not resolved?

Posted in reply to PaigeMiller

Thanks Paige Miller! Code now doesn't log Warning messages. Oink! Oink! :-)

View solution in original post


All Replies
Respected Advisor
Posts: 2,161

Re: Warning: Apparent symbolic reference not resolved?

[ Edited ]
Posted in reply to MichaelSwift

&&high&i works as intended

&&high%eval(&i+1) does not work because it is not in the format &&macrovar&index

 

perhaps you want this

%let oink=%eval(&i+1);

&&high&oink

--
Paige Miller
Solution
‎10-16-2017 03:06 PM
New Contributor
Posts: 2

Re: Warning: Apparent symbolic reference not resolved?

Posted in reply to PaigeMiller

Thanks Paige Miller! Code now doesn't log Warning messages. Oink! Oink! :-)

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 453 views
  • 0 likes
  • 2 in conversation