<?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: using %sysexec chmod in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642237#M78384</link>
    <description>&lt;P&gt;What do you know about the files? Do they all start with&amp;nbsp;&lt;SPAN&gt;CORE_BANK_OUT1_? Or do you need to apply your chmod for all files with a specific timestamp?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The common criteria will define which logic to use.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The format of your timestamp is "basic ISO", for which SAS provides the format B8601DT15.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Apr 2020 14:06:33 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-04-23T14:06:33Z</dc:date>
    <item>
      <title>using %sysexec chmod</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642223#M78382</link>
      <description>&lt;P&gt;I am trying to use&amp;nbsp;%sysexec chmod to set permission for files&lt;/P&gt;&lt;P&gt;issue is files are named with the timestamp which is hard to add in the code itself&lt;/P&gt;&lt;P&gt;any suggested workarounds?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;files names like the below:&lt;/P&gt;&lt;P&gt;CORE_BANK_OUT1_20200423T145023.txt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 13:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642223#M78382</guid>
      <dc:creator>MAGED_AKL</dc:creator>
      <dc:date>2020-04-23T13:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: using %sysexec chmod</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642236#M78383</link>
      <description>&lt;P&gt;Try first to get that working out of a command prompt without using SAS at all.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could Google with keywords like:&amp;nbsp;&lt;EM&gt;linux chmod multiple files&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you've got the OS command working and you need to call it via SAS then I'd go for a Filename Pipe approach over using %sysexec()&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 14:08:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642236#M78383</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-04-23T14:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: using %sysexec chmod</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642237#M78384</link>
      <description>&lt;P&gt;What do you know about the files? Do they all start with&amp;nbsp;&lt;SPAN&gt;CORE_BANK_OUT1_? Or do you need to apply your chmod for all files with a specific timestamp?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The common criteria will define which logic to use.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The format of your timestamp is "basic ISO", for which SAS provides the format B8601DT15.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 14:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642237#M78384</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-23T14:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: using %sysexec chmod</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642238#M78385</link>
      <description>&lt;P&gt;files are extracted using a sas code on a AIX environment&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;call symputx('timestamp',put(datetime(),B8601DT.));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;PROC EXPORT DATA=CORE_BANK_OUTT&amp;amp;i&lt;BR /&gt;OUTFILE="/sas/SASConfig/Lev1/Applications/SASComplianceSolutions/FCFBU1/reports/risk_rating_report/Finished/SAS_CORE_BANK_OUT&amp;amp;i._&amp;amp;timestamp..txt"&lt;BR /&gt;DBMS=dlm REPLACE;&lt;BR /&gt;DELIMITER='|';&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where&amp;nbsp;&amp;amp;i represents the sequence of the file&lt;/P&gt;&lt;P&gt;the need is to give permission to all files starting with the fixed prefix "&lt;SPAN&gt;CORE_BANK_OUT"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 14:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642238#M78385</guid>
      <dc:creator>MAGED_AKL</dc:creator>
      <dc:date>2020-04-23T14:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: using %sysexec chmod</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642239#M78386</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/206641"&gt;@MAGED_AKL&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the need is to give permission to all files starting with the fixed prefix "&lt;SPAN&gt;CORE_BANK_OUT"&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well, that's easy, as chmod accepts a list of files, and the shell expands wildcards:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "chmod 600 /sas/SASConfig/Lev1/Applications/SASComplianceSolutions/FCFBU1/reports/risk_rating_report/Finished/SAS_CORE_BANK_OUT* 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(replace the 600 with whatever permissions you need)&lt;/P&gt;
&lt;P&gt;As chmod remains "silent" if everything is OK, a look at the SAS log will tell you if something untoward happened.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 14:15:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642239#M78386</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-23T14:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: using %sysexec chmod</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642240#M78387</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/206641"&gt;@MAGED_AKL&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;files are extracted using a sas code on a AIX environment&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;call symputx('timestamp',put(datetime(),B8601DT.));&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;PROC EXPORT DATA=CORE_BANK_OUTT&amp;amp;i&lt;BR /&gt;OUTFILE="/sas/SASConfig/Lev1/Applications/SASComplianceSolutions/FCFBU1/reports/risk_rating_report/Finished/SAS_CORE_BANK_OUT&amp;amp;i._&amp;amp;timestamp..txt"&lt;BR /&gt;DBMS=dlm REPLACE;&lt;BR /&gt;DELIMITER='|';&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where&amp;nbsp;&amp;amp;i represents the sequence of the file&lt;/P&gt;
&lt;P&gt;the need is to give permission to all files starting with the fixed prefix "&lt;SPAN&gt;CORE_BANK_OUT"&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If above is the process which creates the files then you could eventually set a UMASK before so the files get created with the desired permissions from start.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 14:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642240#M78387</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-04-23T14:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: using %sysexec chmod</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642242#M78388</link>
      <description>&lt;P&gt;Worked great&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 14:22:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/using-sysexec-chmod/m-p/642242#M78388</guid>
      <dc:creator>MAGED_AKL</dc:creator>
      <dc:date>2020-04-23T14:22:33Z</dc:date>
    </item>
  </channel>
</rss>

