<?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: How to generate an Error in the log when &amp;quot;Library does not exist&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-generate-an-Error-in-the-log-when-quot-Library-does-not/m-p/614828#M179790</link>
    <description>&lt;P&gt;Depending on your version of SAS,&amp;nbsp;one idea is&amp;nbsp;to write&amp;nbsp;in a little bit of macro code to create an error message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xyz "AnIncorrectPath";
 %if &amp;amp;syslibrc ne 0 %then %do;
      %put ERROR:The library you tried to create does not exist;
 %end;

data example;
set sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="log.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35117i93DA8610B2A0EA69/image-size/large?v=v2&amp;amp;px=999" role="button" title="log.PNG" alt="log.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Documentation for %if %then : &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=n18fij8dqsue9pn1lp8436e5mvb7.htm&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=n18fij8dqsue9pn1lp8436e5mvb7.htm&amp;amp;locale=en&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Documentation for the syslibrc automatic macro variable: &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=p0vnvc6k3fo349n1aszgd2ls6oxk.htm&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=p0vnvc6k3fo349n1aszgd2ls6oxk.htm&amp;amp;locale=en&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even though you are manually creating the error and&amp;nbsp;not EG automatically, hope this helps some. If this isn't what you were going for, feel free to disregard.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jan 2020 18:06:08 GMT</pubDate>
    <dc:creator>brzcol</dc:creator>
    <dc:date>2020-01-02T18:06:08Z</dc:date>
    <item>
      <title>How to generate an Error in the log when "Library does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-generate-an-Error-in-the-log-when-quot-Library-does-not/m-p/614774#M179785</link>
      <description>&lt;P&gt;When SAS Enterprise Guide 7.15 is assigned a library that does not exist, it simply produces a note:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Library CALCOUT does not exist.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is a rather unhelpful default since the message gets buried in the log. I've searched a lot trying to find a way to force an Error (or at least a Warning) when a library does not exist, but I can't find anything. It also seems like some versions of SAS automatically generate an error (SAS Studio?), but that's not the case with EG. Does anyone know of a way to change this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 15:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-generate-an-Error-in-the-log-when-quot-Library-does-not/m-p/614774#M179785</guid>
      <dc:creator>AI_Vonnegut</dc:creator>
      <dc:date>2020-01-02T15:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate an Error in the log when "Library does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-generate-an-Error-in-the-log-when-quot-Library-does-not/m-p/614828#M179790</link>
      <description>&lt;P&gt;Depending on your version of SAS,&amp;nbsp;one idea is&amp;nbsp;to write&amp;nbsp;in a little bit of macro code to create an error message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xyz "AnIncorrectPath";
 %if &amp;amp;syslibrc ne 0 %then %do;
      %put ERROR:The library you tried to create does not exist;
 %end;

data example;
set sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="log.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35117i93DA8610B2A0EA69/image-size/large?v=v2&amp;amp;px=999" role="button" title="log.PNG" alt="log.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Documentation for %if %then : &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=n18fij8dqsue9pn1lp8436e5mvb7.htm&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=n18fij8dqsue9pn1lp8436e5mvb7.htm&amp;amp;locale=en&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Documentation for the syslibrc automatic macro variable: &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=p0vnvc6k3fo349n1aszgd2ls6oxk.htm&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=p0vnvc6k3fo349n1aszgd2ls6oxk.htm&amp;amp;locale=en&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even though you are manually creating the error and&amp;nbsp;not EG automatically, hope this helps some. If this isn't what you were going for, feel free to disregard.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 18:06:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-generate-an-Error-in-the-log-when-quot-Library-does-not/m-p/614828#M179790</guid>
      <dc:creator>brzcol</dc:creator>
      <dc:date>2020-01-02T18:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate an Error in the log when "Library does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-generate-an-Error-in-the-log-when-quot-Library-does-not/m-p/614846#M179800</link>
      <description>&lt;P&gt;Thanks. I am familiar with %IF %THEN statements and have used them for custom messages in the past - but at least in EG, they can't be used in open code and must be inside a %MACRO statement. While I can do this, a macro won't be a clean solution (I would have to make a global macro to apply across all programs within EG). I really thought there would be an option or a setting within SAS that would give a warning/error when a library doesn't exist. Rather surprising that it's not possible to do this (if indeed that's the case).&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 20:13:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-generate-an-Error-in-the-log-when-quot-Library-does-not/m-p/614846#M179800</guid>
      <dc:creator>AI_Vonnegut</dc:creator>
      <dc:date>2020-01-02T20:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate an Error in the log when "Library does not exist"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-generate-an-Error-in-the-log-when-quot-Library-does-not/m-p/614877#M179805</link>
      <description>&lt;P&gt;Note that whether %IF %THEN %DO works in open code or not has nothing to do with whether you are using Enterprise Guide or not.&amp;nbsp; It just depends on what version of SAS your Enterprise Guide session is using to run the SAS code you ask it to run for you.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 22:12:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-generate-an-Error-in-the-log-when-quot-Library-does-not/m-p/614877#M179805</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-01-02T22:12:58Z</dc:date>
    </item>
  </channel>
</rss>

