<?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 _Error_ in Proc copy in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-in-Proc-copy/m-p/500625#M133350</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want some alternative for _Error_ in proc copy. I want to copy all dataset from one library to another library and while doing so,if any error occurred I want to use the do and if condition to control the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example-:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc copy in=libname1 out=libname2;&lt;/P&gt;&lt;P&gt;if_error_=1 then do;&lt;/P&gt;&lt;P&gt;%message(call a macro);&lt;/P&gt;&lt;P&gt;%put(" THere is a error while copying");&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know _error_ will work with dataset. But not sure either it will work with procedure or not.If anyone can suggest me the alternative for the same it will be a great help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ankit&lt;/P&gt;</description>
    <pubDate>Tue, 02 Oct 2018 05:22:01 GMT</pubDate>
    <dc:creator>ankitk321</dc:creator>
    <dc:date>2018-10-02T05:22:01Z</dc:date>
    <item>
      <title>_Error_ in Proc copy</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-in-Proc-copy/m-p/500625#M133350</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want some alternative for _Error_ in proc copy. I want to copy all dataset from one library to another library and while doing so,if any error occurred I want to use the do and if condition to control the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example-:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc copy in=libname1 out=libname2;&lt;/P&gt;&lt;P&gt;if_error_=1 then do;&lt;/P&gt;&lt;P&gt;%message(call a macro);&lt;/P&gt;&lt;P&gt;%put(" THere is a error while copying");&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know _error_ will work with dataset. But not sure either it will work with procedure or not.If anyone can suggest me the alternative for the same it will be a great help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ankit&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 05:22:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-in-Proc-copy/m-p/500625#M133350</guid>
      <dc:creator>ankitk321</dc:creator>
      <dc:date>2018-10-02T05:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: _Error_ in Proc copy</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-in-Proc-copy/m-p/500629#M133353</link>
      <description>&lt;P&gt;Lots of errors and misunderstandings here:&lt;/P&gt;
&lt;P&gt;First, the macro &lt;STRONG&gt;PRE&lt;/STRONG&gt;processor is exactly that: the macro is resolved while the code is being read for execution, not when the procdure runs.&lt;/P&gt;
&lt;P&gt;Second, data step code won't work in procedures. Only some statements (eg "by") are quasi-global.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the automatic macro variable &amp;amp;syscc before and after the proc copy step. Make sure that your code before that step is clean and leaves syscc at its initial value 0.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 06:18:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-in-Proc-copy/m-p/500629#M133353</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-10-02T06:18:23Z</dc:date>
    </item>
  </channel>
</rss>

