<?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: SAS Critical error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442912#M110780</link>
    <description>&lt;P&gt;Unfortunately we can not use it because we&amp;nbsp;only test the programs using enterprise guide. We need the code to work when sending it to the production enviroment where there is no SAS Enterprise Guide.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Mar 2018 14:57:49 GMT</pubDate>
    <dc:creator>Loko</dc:creator>
    <dc:date>2018-03-06T14:57:49Z</dc:date>
    <item>
      <title>SAS Critical error when copying file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442882#M110765</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a simple basic code (from Sas Enterprise Guide 7.1) which connects to a server and copies a file from a shared path (between 2 servers) to a local path. part of the code :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%signon;
rsubmit;
&lt;BR /&gt;/*F is the shared path, D is local*/
data _null_;
x "cd F:\Folder";
x "copy aaa.csv D:\path\folder\aaa.csv";
run;

endrsubmit;
signoff;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When checking the log, it states:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Remote submit to SERVER commencing.
Critical error
1    data _null_;
2    x "cd F:\folder"
2  !              ;
3    x "copy aaa.csv D:\path\folder\aaa.csv"
3  !                                                                      ;
4    run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So no copy done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it is strange that if we try to copy within the same partition it works. this code works:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
x "cd D:\folder";
x "copy aaa.csv D:\path\folder\aaa.csv";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There is no case of non - existing files / paths. They do exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 14:47:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442882#M110765</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2018-03-06T14:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Critical error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442883#M110766</link>
      <description>&lt;P&gt;Is the F: drive a network share?&amp;nbsp; If so, you might not have the drive mapping available to you via this SAS/CONNECT session.&amp;nbsp; Instead, you might need to specify the full path, UNC notation, in your copy command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;copy \\myserver\folder\file.csv D:\dest\folder\.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(I used the dot notation to indicate "copy to the folder using the same file name as the source")&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 13:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442883#M110766</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-03-06T13:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Critical error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442892#M110769</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have changed it to:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;x "copy \\server\folder\file.csv D:\path\aaa.csv";
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The error is gone but still no copy done.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 14:13:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442892#M110769</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2018-03-06T14:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Critical error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442894#M110770</link>
      <description>&lt;P&gt;If you want to know what any external command &lt;EM&gt;really&lt;/EM&gt; does, use the filename pipe method:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "copy \\server\folder\file.csv D:\path\aaa.csv 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All responses (including those to stderr, that's what the 2&amp;gt;&amp;amp;1 does) will be caught in the SAS log.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 14:25:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442894#M110770</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-06T14:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Critical error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442899#M110774</link>
      <description>&lt;P&gt;This is helpful&amp;nbsp; - the log says "The network name cannot be found."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That folder we try to copy from is shared between a unix server (where we run sas and generate results)&amp;nbsp; to the local path of a windows machine where we have excel installed.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 14:39:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442899#M110774</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2018-03-06T14:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Critical error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442909#M110779</link>
      <description>&lt;P&gt;Another approach you can try: The &lt;A href="https://blogs.sas.com/content/sasdummy/2012/12/06/copy-files-in-sas-eg/" target="_self"&gt;Copy Files task&lt;/A&gt; in SAS Enterprise Guide.&amp;nbsp; It's built-in as of v7.13 and available as a download for earlier releases.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 14:49:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442909#M110779</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-03-06T14:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Critical error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442912#M110780</link>
      <description>&lt;P&gt;Unfortunately we can not use it because we&amp;nbsp;only test the programs using enterprise guide. We need the code to work when sending it to the production enviroment where there is no SAS Enterprise Guide.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 14:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442912#M110780</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2018-03-06T14:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Critical error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442924#M110785</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have run this command&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "net share 2&amp;gt;&amp;amp;1";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and&amp;nbsp;when checking it;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Share name   Resource                        Remark
-------------------------------------------------------------------------------
C$           C:\                             Default share                     
D$           D:\                             Default share                     
IPC$                                         Remote IPC                        
ADMIN$       C:\windows                      Remote Admin                      
XXXX     D:\folderi\SUBFOLDER              
The command completed successfully.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I guess it is smth wrong with shared folder F was set&amp;nbsp;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 15:20:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442924#M110785</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2018-03-06T15:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Critical error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442928#M110786</link>
      <description>&lt;P&gt;If you don't have &lt;STRONG&gt;COPY FILES &lt;/STRONG&gt;in your SAS EG, you can try some open source FTP like WinSCP on your windows machine.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 15:28:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442928#M110786</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-03-06T15:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Critical error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442953#M110788</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/33792"&gt;@Loko&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Unfortunately we can not use it because we&amp;nbsp;only test the programs using enterprise guide. We need the code to work when sending it to the production enviroment where there is no SAS Enterprise Guide.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then I'd let the datacenter operators handle the copy from the scheduler. They usually know all their network connections.&lt;/P&gt;
&lt;P&gt;I do it like that, quite easily because we have our in/out filenames supplied as environment variables from the scheduler to the SAS jobs.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 16:26:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Critical-error-when-copying-file/m-p/442953#M110788</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-06T16:26:52Z</dc:date>
    </item>
  </channel>
</rss>

