<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Warning: Apparent symbolic reference not resolved? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509391#M136946</link>
    <description>&lt;P&gt;We cannot see any of that and still doesn't really relate to the output code as that's input.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: the problem is in your code, which you're not showing. You don't have to show the actual data, in fact it's preferable to simplify it and use example data and links to illustrate the problem. If you can't illustrate it with sample data then you usually know it has something to do with your system/data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194581"&gt;@xiangpang&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;input file has a figure with a name. I think the original code logic is&amp;nbsp;when first line is not blank then name following the figure will be inserted.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Nov 2018 01:19:46 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-11-01T01:19:46Z</dc:date>
    <item>
      <title>Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509376#M136933</link>
      <description>&lt;P&gt;I have&lt;SPAN&gt; some following SAS code in macro:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It produces the correct&amp;nbsp;output but with log warnings:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: Apparent symbolic reference name not resolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I searched&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro page (filein=, ls=, numofpages=); 

data _null_;
   infile "&amp;amp;filein." length = vlg ;
   input @1 line $varying&amp;amp;ls.. vlg;
   if _n_=1 and line="" then delete;
   if _n_=1 then call symput("name",line); run;

data odsprn_;
   retain num 1 pageno 0 lineno 0;
   length line $&amp;amp;ls..;
   infile "&amp;amp;filein." length=vlg end=fin;
   n=_n_;
   numpages=&amp;amp;numofpages.*1;
   input @1 line $varying&amp;amp;ls.. vlg;

   if upcase(substr(line,1,length(line))) = upcase(substr("&amp;amp;name.", 1)) then put _page_;
.
.
.

run;
%mend;

%page (filein=try, ls=15, numofpages=100); &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the forum and found it&amp;nbsp;could be because 'name' is not assigned as a macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to add %global name; but still have the warning.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone help me to figure out how to remove the warning ?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 23:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509376#M136933</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-10-31T23:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509377#M136934</link>
      <description>&lt;P&gt;In this condition you delete the record and may not have a macro variable. How do you want to handle that situation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; _n_&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; and line&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;""&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;delete&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194581"&gt;@xiangpang&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have&lt;SPAN&gt; some following SAS code in macro:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It produces the correct&amp;nbsp;output but with log warnings:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WARNING: Apparent symbolic reference name not resolved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I searched&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro page (filein=, ls=, numofpages=); 

data _null_;
   infile "&amp;amp;filein." length = vlg ;
   input @1 line $varying&amp;amp;ls.. vlg;
   if _n_=1 and line="" then delete;
   if _n_=1 then call symput("name",line); run;

data odsprn_;
   retain num 1 pageno 0 lineno 0;
   length line $&amp;amp;ls..;
   infile "&amp;amp;filein." length=vlg end=fin;
   n=_n_;
   numpages=&amp;amp;numofpages.*1;
   input @1 line $varying&amp;amp;ls.. vlg;

   if upcase(substr(line,1,length(line))) = upcase(substr("&amp;amp;name.", 1)) then put _page_;
.
.
.

run;
%mend;

%page (filein=try, ls=15, numofpages=100); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the forum and found it&amp;nbsp;could be because 'name' is not assigned as a macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to add %global name; but still have the warning.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could anyone help me to figure out how to remove the warning ?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 23:58:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509377#M136934</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-31T23:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509378#M136935</link>
      <description>&lt;P&gt;I am really surprised you find the issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;the original code does not have '&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; _n_&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; and line&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;""&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;delete&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;'. the problem is without this line of code, the first page of output is blank, while the output figure is in next page.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so I add ' &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; _n_&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; and line&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;""&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;delete&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;' making the output right. but got this warning. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token punctuation"&gt;Do you have other way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token punctuation"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 00:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509378#M136935</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-11-01T00:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509379#M136936</link>
      <description>&lt;P&gt;Using your code to derive the logic it appears you only need to read the very occurrence where line is not missing to populate macro variable &amp;amp;name. If that's true then code as below should do.&lt;/P&gt;
&lt;PRE&gt;%let name=;&lt;BR /&gt;data _null_;&lt;BR /&gt;&amp;nbsp; infile "&amp;amp;filein." length = vlg;&lt;BR /&gt;&amp;nbsp; input @1 line $varying&amp;amp;ls.. vlg;&lt;BR /&gt;&amp;nbsp; if not missing(line) then &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call symput("name",line);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stop;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;run;&lt;CODE class=" language-sas"&gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Nov 2018 00:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509379#M136936</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-11-01T00:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509382#M136937</link>
      <description>&lt;P&gt;Thanks for your reply. I just tried your code. It has no warning message but still the first page is blank, same as original code without 'if _n_=1 and line="" then delete;'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you make the first line is not blank when _n_=1 , while&amp;nbsp;&lt;SPAN&gt; populate macro variable &amp;amp;name?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 00:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509382#M136937</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-11-01T00:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509383#M136938</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194581"&gt;@xiangpang&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am really surprised you find the issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the original code does not have '&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; _n_&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; and line&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;""&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;delete&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;'. the problem is without this line of code, the first page of output is blank, while the output figure is in next page.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so I add ' &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; _n_&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; and line&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;""&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;delete&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;' making the output right. but got this warning. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token punctuation"&gt;Do you have other way?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token punctuation"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It depends, at this point it depends on what's in the input file and what you're trying to account for there, which I do not know.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What happens if that file doesn't have the value you need though? You're not accounting for that case.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output page issue&amp;nbsp;be coincidental or indicative of a different issue in your process.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 00:41:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509383#M136938</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-01T00:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509384#M136939</link>
      <description>I think that's a separate issue and you haven't shown any code to create a blank page (or any output) so it's hard to know where to start. You've only shown input steps.</description>
      <pubDate>Thu, 01 Nov 2018 00:43:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509384#M136939</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-01T00:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509386#M136941</link>
      <description>&lt;P&gt;input file has a figure with a name. I think the original code logic is&amp;nbsp;when first line is not blank then name following the figure will be inserted.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 00:48:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509386#M136941</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-11-01T00:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509388#M136943</link>
      <description>&lt;P&gt;the input file is like following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---here, it is a blank line, then&lt;/P&gt;&lt;P&gt;name&lt;/P&gt;&lt;P&gt;_____________________________________________________________________________________________________________&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;~S={just=c preimage='A:\figure.png'}&lt;/P&gt;&lt;P&gt;_____________________________________________________________________________________________________________&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 00:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509388#M136943</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-11-01T00:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Warning: Apparent symbolic reference not resolved?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509391#M136946</link>
      <description>&lt;P&gt;We cannot see any of that and still doesn't really relate to the output code as that's input.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: the problem is in your code, which you're not showing. You don't have to show the actual data, in fact it's preferable to simplify it and use example data and links to illustrate the problem. If you can't illustrate it with sample data then you usually know it has something to do with your system/data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194581"&gt;@xiangpang&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;input file has a figure with a name. I think the original code logic is&amp;nbsp;when first line is not blank then name following the figure will be inserted.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 01:19:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-Apparent-symbolic-reference-not-resolved/m-p/509391#M136946</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-01T01:19:46Z</dc:date>
    </item>
  </channel>
</rss>

