<?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 excecute a perl command via a pipe command in SAS in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-excecute-a-perl-command-via-a-pipe-command-in-SAS/m-p/935045#M44969</link>
    <description>&lt;P&gt;Why would it work any differently????&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just be careful with the quotes.&amp;nbsp; Both SAS and unix shells are picky about making sure the quotes a balanced and appropriate.&amp;nbsp; The QUOTE() function can help.&lt;/P&gt;
&lt;P&gt;Note you don't need to use a FILENAME statement.&amp;nbsp; You can include the command in the INFILE statement directly instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path1=/some/folder/name ;&lt;BR /&gt;%let cmd=perl -pe 's/[^çêèàûéîôâÇÀÛÔÉÇÈÊ"@-_&amp;lt;&amp;gt;’[:ascii:][:alnum:][:space:][:punct:]]+//g' &amp;lt;/&amp;amp;Path1/Virage Survey.xml &amp;gt;&amp;amp;Path1./VirageSurvey.xml;
data _null_;&lt;BR /&gt;  infile %sysfunc(quote(&amp;amp;cmd)) pipe;&lt;BR /&gt;  input;&lt;BR /&gt;  put _infile_;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2024 20:11:40 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-07-08T20:11:40Z</dc:date>
    <item>
      <title>how to excecute a perl command via a pipe command in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-excecute-a-perl-command-via-a-pipe-command-in-SAS/m-p/935038#M44966</link>
      <description>&lt;P&gt;Here's an example how to rename a file in Unix via a pipe command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "mv ""&amp;amp;file_path./&amp;amp;xmlFile."" ""&amp;amp;file_path./&amp;amp;xmlFile2."" 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But how do we execute the following perl command:&lt;/P&gt;
&lt;P&gt;perl -pe 's/[^çêèàûéîôâÇÀÛÔÉÇÈÊ"@-_&amp;lt;&amp;gt;’[:ascii:][:alnum:][:space:][:punct:]]+//g' &amp;lt;/&amp;amp;Path1/Virage Survey.xml&amp;gt; &amp;amp;Path1./VirageSurvey.xml&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 19:54:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-excecute-a-perl-command-via-a-pipe-command-in-SAS/m-p/935038#M44966</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-07-08T19:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to excecute a perl command via a pipe command in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-excecute-a-perl-command-via-a-pipe-command-in-SAS/m-p/935045#M44969</link>
      <description>&lt;P&gt;Why would it work any differently????&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just be careful with the quotes.&amp;nbsp; Both SAS and unix shells are picky about making sure the quotes a balanced and appropriate.&amp;nbsp; The QUOTE() function can help.&lt;/P&gt;
&lt;P&gt;Note you don't need to use a FILENAME statement.&amp;nbsp; You can include the command in the INFILE statement directly instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path1=/some/folder/name ;&lt;BR /&gt;%let cmd=perl -pe 's/[^çêèàûéîôâÇÀÛÔÉÇÈÊ"@-_&amp;lt;&amp;gt;’[:ascii:][:alnum:][:space:][:punct:]]+//g' &amp;lt;/&amp;amp;Path1/Virage Survey.xml &amp;gt;&amp;amp;Path1./VirageSurvey.xml;
data _null_;&lt;BR /&gt;  infile %sysfunc(quote(&amp;amp;cmd)) pipe;&lt;BR /&gt;  input;&lt;BR /&gt;  put _infile_;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 20:11:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-excecute-a-perl-command-via-a-pipe-command-in-SAS/m-p/935045#M44969</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-07-08T20:11:40Z</dc:date>
    </item>
  </channel>
</rss>

