<?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 check whether a dataset was copied using proc datasets? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705263#M216305</link>
    <description>&lt;P&gt;Well, it doesn't fully solve the problem, because if some other step before &lt;STRONG&gt;proc datasets&amp;nbsp;&lt;/STRONG&gt;fails then syscc is set to an error number, so when &lt;STRONG&gt;proc datasets&amp;nbsp;&lt;/STRONG&gt;executes afterwards and doesn't fail - the syscc is not reset to 0.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Dec 2020 08:54:28 GMT</pubDate>
    <dc:creator>pavelr</dc:creator>
    <dc:date>2020-12-11T08:54:28Z</dc:date>
    <item>
      <title>How to check whether a dataset was copied using proc datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705245#M216295</link>
      <description>&lt;P&gt;Is there a way to check (programmatically) whether a dataset was really copied using &lt;STRONG&gt;proc datasets; copy&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;For example, in a program I use &lt;STRONG&gt;proc datasets; copy&lt;/STRONG&gt;&amp;nbsp;to copy a dataset, then I need to do some actions with this dataset. But before I do something with this dataset I want to check whether it was really copied (copying was not terminated by a poor connection or but some other reasons). How can I do it in my program?&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 06:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705245#M216295</guid>
      <dc:creator>pavelr</dc:creator>
      <dc:date>2020-12-11T06:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to check whether a dataset was copied using proc datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705246#M216296</link>
      <description>&lt;P&gt;I don't think Proc Datasets offers that.. Would it be enough to check if the copied dataset exist?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 06:37:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705246#M216296</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-12-11T06:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to check whether a dataset was copied using proc datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705247#M216297</link>
      <description>&lt;P&gt;Thanks for your reply. To check if the copied dataset exist is not really enough, because it already exists there, but I need to copy (refresh/replace) this dataset periodically and to know whether &lt;STRONG&gt;proc datasets; copy&lt;/STRONG&gt; failed or not. To delete this dataset before copying a new version of it is not an option either.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 06:46:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705247#M216297</guid>
      <dc:creator>pavelr</dc:creator>
      <dc:date>2020-12-11T06:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to check whether a dataset was copied using proc datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705248#M216298</link>
      <description>&lt;P&gt;Ok. How about this. Run Proc Datasets and check the SysCC macro variable for success.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets nolist;
   copy in = sashelp out = work memtype = data;
   select class;
run;quit;

%put &amp;amp;=syscc.;

proc datasets nolist;
   copy in = abc out = work memtype = data;
   select class;
run;quit;

%put &amp;amp;=syscc.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Dec 2020 07:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705248#M216298</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-12-11T07:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to check whether a dataset was copied using proc datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705249#M216299</link>
      <description>&lt;P&gt;You could try&amp;nbsp;FINFO() function to get modification date, see the doc for the details:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=vdmmlcdc&amp;amp;cdcVersion=1.0&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p0cpuq4ew0dxipn1vtravlludjm7.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=vdmmlcdc&amp;amp;cdcVersion=1.0&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p0cpuq4ew0dxipn1vtravlludjm7.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is example from doc. which may help:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data info;
   length infoname infoval $60;
   drop rc fid infonum i close;
   rc=filename('abc', 'physical-filename');
   fid=fopen('abc');
   infonum=foptnum(fid);
   do i=1 to infonum;
      infoname=foptname(fid, i);
      infoval=finfo(fid, infoname);
      output;
   end;
   close=fclose(fid);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;all the best&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 07:33:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705249#M216299</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-12-11T07:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to check whether a dataset was copied using proc datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705251#M216300</link>
      <description>&lt;P&gt;This should work. I will try it.&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 07:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705251#M216300</guid>
      <dc:creator>pavelr</dc:creator>
      <dc:date>2020-12-11T07:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to check whether a dataset was copied using proc datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705262#M216304</link>
      <description>&lt;P&gt;Thank you, Bart! This seems to be a good solution too. Need to look into it.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 08:44:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705262#M216304</guid>
      <dc:creator>pavelr</dc:creator>
      <dc:date>2020-12-11T08:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to check whether a dataset was copied using proc datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705263#M216305</link>
      <description>&lt;P&gt;Well, it doesn't fully solve the problem, because if some other step before &lt;STRONG&gt;proc datasets&amp;nbsp;&lt;/STRONG&gt;fails then syscc is set to an error number, so when &lt;STRONG&gt;proc datasets&amp;nbsp;&lt;/STRONG&gt;executes afterwards and doesn't fail - the syscc is not reset to 0.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 08:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705263#M216305</guid>
      <dc:creator>pavelr</dc:creator>
      <dc:date>2020-12-11T08:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to check whether a dataset was copied using proc datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705270#M216311</link>
      <description>&lt;P&gt;If you get &amp;amp;syscc &amp;gt; 0 then copy failed. (&amp;amp;syscc=4 is a warning - should bechecked).&lt;/P&gt;
&lt;P&gt;You can either abort this session and rerun the copy later in a new session or&lt;/P&gt;
&lt;P&gt;you can reset it by:&amp;nbsp; &lt;STRONG&gt;%let syscc=0;&amp;nbsp;&lt;/STRONG&gt; and continue with other steps.&lt;/P&gt;
&lt;P&gt;In last case you need a warning message to show which file was not copied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 10:08:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-check-whether-a-dataset-was-copied-using-proc-datasets/m-p/705270#M216311</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-12-11T10:08:54Z</dc:date>
    </item>
  </channel>
</rss>

