<?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: Proc SQL - Create Unique Index with PW= in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Create-Unique-Index-with-PW/m-p/206832#M51398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Xia! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Aug 2015 07:39:28 GMT</pubDate>
    <dc:creator>JoeMadden</dc:creator>
    <dc:date>2015-08-26T07:39:28Z</dc:date>
    <item>
      <title>Proc SQL - Create Unique Index with PW=</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Create-Unique-Index-with-PW/m-p/206828#M51394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Afternoon All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone able to create a Unique Index with Proc SQL and the PW= option for a protected dataset?&lt;/P&gt;&lt;P&gt;Works fine when creating a simple index (example);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc Sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Index MY_COL on MY_DATASET (PW=MYPASS);&lt;/P&gt;&lt;P&gt;Quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I've tried different permutation of syntax and failed miserably, the only way I have been able to get it to successfully work is to remove the dataset protection &lt;/P&gt;&lt;P&gt;then apply the UI and then re-apply the protection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;No Protection (OK)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Proc Sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Unique Index MY_INDEX on MY_DATASET (COL1,COL2);&lt;/P&gt;&lt;P&gt;Quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Protection (???) - All incorrect syntax&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Proc Sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Unique Index MY_INDEX on MY_DATASET (PW=MYPASS COL1,COL2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Unique Index MY_INDEX on MY_DATASET ((PW=MYPASS) COL1,COL2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Unique Index MY_INDEX on MY_DATASET (PW=(MYPASS) COL1,COL2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Unique Index MY_INDEX on MY_DATASET (COL1,COL2) (PW=MYPASS);&lt;/P&gt;&lt;P&gt;Quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 14:16:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Create-Unique-Index-with-PW/m-p/206828#M51394</guid>
      <dc:creator>JoeMadden</dc:creator>
      <dc:date>2015-08-25T14:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL - Create Unique Index with PW=</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Create-Unique-Index-with-PW/m-p/206829#M51395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe, and only guessing here, that the (pw=) option is only available on the from part of SQL.&amp;nbsp; I would assign the pw in a post step:&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create unique index MY_INDEX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MY_DATASET (COL1,COL2);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;data my_dataset (pw=xyz);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set my_dataset;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 14:37:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Create-Unique-Index-with-PW/m-p/206829#M51395</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-08-25T14:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL - Create Unique Index with PW=</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Create-Unique-Index-with-PW/m-p/206830#M51396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks RW9, I suspected this maybe the case!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd be interested to know if the unique index is lost in the second step when dataset is re-created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 14:45:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Create-Unique-Index-with-PW/m-p/206830#M51396</guid>
      <dc:creator>JoeMadden</dc:creator>
      <dc:date>2015-08-25T14:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL - Create Unique Index with PW=</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Create-Unique-Index-with-PW/m-p/206831#M51397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this one :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data class;
 set sashelp.class;
 run;
 
proc datasets lib=work nodetails nolist;
modify class(pw=abc);
index create name/unique;
quit;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 02:52:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Create-Unique-Index-with-PW/m-p/206831#M51397</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-08-26T02:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL - Create Unique Index with PW=</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Create-Unique-Index-with-PW/m-p/206832#M51398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Xia! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 07:39:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-Create-Unique-Index-with-PW/m-p/206832#M51398</guid>
      <dc:creator>JoeMadden</dc:creator>
      <dc:date>2015-08-26T07:39:28Z</dc:date>
    </item>
  </channel>
</rss>

