<?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: SCP Transfer in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SCP-Transfer/m-p/119274#M259577</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming that you're using the same user for executing the command in the command prompt and under SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are using double quotes around your command. Are there any macro tokens like '%' or '&amp;amp;' in the bits you can't show us - eg. in &amp;lt;mykey&amp;gt;? Also stuff like double quotes and control characters would cause issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then.... You need to terminate an x command with a ';'. I can't see this in the code you've posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;X&lt;/SPAN&gt; &lt;SPAN class="argOptional"&gt;&amp;lt;'&lt;SPAN class="userSuppliedSyntaxValue"&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/message/p11ba12uypvfazn1jk7acffuzlbl.htm#p1ktg57yfl27fcn1bhdkzwh8abdj" title="Description of syntax: 'operating-environment-command'"&gt;operating-environment-command&lt;/A&gt;&lt;/SPAN&gt;'&amp;gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Apr 2013 00:44:38 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2013-04-25T00:44:38Z</dc:date>
    <item>
      <title>SCP Transfer</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SCP-Transfer/m-p/119273#M259576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good afternoon SAS Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try not to bug you guys unless I'm banging my head up against a wall, but I'm having difficulty with this one as I am not quite sure what to put into a search engine to bring this sort of thing up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got my RSA keys generated and placed in the proper place. If I copy the shell command without the quotes or the X and paste it into the command prompt on the UNIX server, it works perfectly, I can go out to the ftp transport site and see the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13668278836664351" jivemacro_uid="_13668278836664351"&gt;
&lt;P&gt;rsubmit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; x "scp -i /home/user/&amp;lt;myusername&amp;gt;/.ssh/&amp;lt;mykey&amp;gt; /&amp;lt;ourdirectory&amp;gt;/TESTFILE.01 &amp;lt;mylogin&amp;gt;@&amp;lt;anftpaddress&amp;gt;.com:TESTFILE.01"&lt;/P&gt;
&lt;P&gt;endrsubmit;&lt;/P&gt;
&lt;P&gt;signoff;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run this code, however, it just states "Running..." in the task status window and never seems to resolve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone point me to either an article that would help me or tell me what I'm doing wrong?&amp;nbsp; Shell commands are turned on from our SAS administrator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help you can provide, I very much appreciate it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Forgot to mention, anything in the code within &amp;lt;&amp;gt; is replaced to mask aspects of business and all.&amp;nbsp; I'm not submitting it with those.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: John Simmons&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2013 18:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SCP-Transfer/m-p/119273#M259576</guid>
      <dc:creator>JohnSimmons</dc:creator>
      <dc:date>2013-04-24T18:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: SCP Transfer</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SCP-Transfer/m-p/119274#M259577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming that you're using the same user for executing the command in the command prompt and under SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are using double quotes around your command. Are there any macro tokens like '%' or '&amp;amp;' in the bits you can't show us - eg. in &amp;lt;mykey&amp;gt;? Also stuff like double quotes and control characters would cause issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then.... You need to terminate an x command with a ';'. I can't see this in the code you've posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;X&lt;/SPAN&gt; &lt;SPAN class="argOptional"&gt;&amp;lt;'&lt;SPAN class="userSuppliedSyntaxValue"&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/message/p11ba12uypvfazn1jk7acffuzlbl.htm#p1ktg57yfl27fcn1bhdkzwh8abdj" title="Description of syntax: 'operating-environment-command'"&gt;operating-environment-command&lt;/A&gt;&lt;/SPAN&gt;'&amp;gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 00:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SCP-Transfer/m-p/119274#M259577</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-04-25T00:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: SCP Transfer</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SCP-Transfer/m-p/119275#M259578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good afternoon Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I originally thought it could be one of my variables, so I stripped all of them out and used explicit calls of both paths and files, to the point that I can copy exactly what is in the quotes into the UNIX command line and it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ; was just from my re-writing the code here, it is there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The double quotes being used is because originally, I had it wrapped up in a macro to allow me to use this piece of code again and again, but have since pulled it out of that so I could test it and just get it to work once.&amp;nbsp; Ideally, when I get this working, I would be expecting to run this with variables pushed in for filenames and such.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, the user ID I'm using in SAS is the same I used to generate the keys and log into the UNIX server to test the command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So just to clean it up:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13668520833173043" jivemacro_uid="_13668520833173043" modifiedtitle="true"&gt;
&lt;P&gt;rsubmit;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; X "SCP -i /home/user/myuserid/MY_PRIVATE_KEY /myunixdirectory/TESTFILE.07 &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:mylogin@ourftpsite.com"&gt;mylogin@ourftpsite.com&lt;/A&gt;&lt;SPAN&gt;:TESTFILE.07";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;endrsubmit;&lt;/P&gt;
&lt;P&gt;signoff;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 01:10:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SCP-Transfer/m-p/119275#M259578</guid>
      <dc:creator>JohnSimmons</dc:creator>
      <dc:date>2013-04-25T01:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: SCP Transfer</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SCP-Transfer/m-p/119276#M259579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently it was my SAS job that got hung up, probably on one of my previously failed attempts.&amp;nbsp; My guess is that it was waiting for a password, not being able to accept my key location and when I stopped the "Running..." job, it never did the signoff or endrsubmit, causing my whole job to become corrupted with my lack of knowledge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So!&amp;nbsp; I rebuilt my SAS EG file, re-ran the code and it worked perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My apologies and Patrick, thank you for your help, this one is chalked up to my being too bullheaded about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 01:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SCP-Transfer/m-p/119276#M259579</guid>
      <dc:creator>JohnSimmons</dc:creator>
      <dc:date>2013-04-25T01:31:18Z</dc:date>
    </item>
  </channel>
</rss>

