<?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: Defining a Password by Characters in File Name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Defining-a-Password-by-Characters-in-File-Name/m-p/86048#M18478</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't show us your code so it's a bit hard to give you a concrete answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On a general level: Wouldn't a substring() function with the filename as source string give you what you need? ... substrn(scan("B06 FY13&amp;nbsp; Report.xml",-2,'/\.'),1,3)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 06 Oct 2012 08:25:29 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2012-10-06T08:25:29Z</dc:date>
    <item>
      <title>Defining a Password by Characters in File Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Defining-a-Password-by-Characters-in-File-Name/m-p/86047#M18477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all--&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may be a tricky question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I use a Macro which password protects xml files. The macro %includeds a .vbs program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;options&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;noxsync&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;noxwait&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: blue; background-color: white;"&gt;%include&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: purple; background-color: white;"&gt;"X:\Programs\convert.sas"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;convert_files&lt;/EM&gt;&lt;/STRONG&gt;(default=X:\Datasets\Scores,ext=xml,password=test);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;When the program runs it password protects every file in the folder with the same password -- in the case above "test. I need to change this so the password is different for every file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt; The password starts with the letters ORE and then the code which is the first three characters in the file name.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;For file : &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;"700 FY13&amp;nbsp; Report.xml" The password needs to be &lt;STRONG&gt;ORE700&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;For file:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;"B06 FY13&amp;nbsp; Report.xml" The password needs to be &lt;STRONG&gt;OREB06&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;For file:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;"J10 FY13 Q1&amp;nbsp; Report.xml" The password needs to be &lt;STRONG&gt;OREJ10&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Is there a way to read the first three characters of a file name and then use those characters in the password? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You feedback is appreciated! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 19:52:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Defining-a-Password-by-Characters-in-File-Name/m-p/86047#M18477</guid>
      <dc:creator>RobertNYC</dc:creator>
      <dc:date>2012-10-04T19:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a Password by Characters in File Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Defining-a-Password-by-Characters-in-File-Name/m-p/86048#M18478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't show us your code so it's a bit hard to give you a concrete answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On a general level: Wouldn't a substring() function with the filename as source string give you what you need? ... substrn(scan("B06 FY13&amp;nbsp; Report.xml",-2,'/\.'),1,3)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2012 08:25:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Defining-a-Password-by-Characters-in-File-Name/m-p/86048#M18478</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-10-06T08:25:29Z</dc:date>
    </item>
  </channel>
</rss>

