<?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 PROC SQL does not care of READONLY libname ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-does-not-care-of-READONLY-libname/m-p/831048#M328397</link>
    <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have two jobs that can run in parallel some times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One job (A) will update a table and one job (B)&amp;nbsp; just need to read the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So to avoid lock, job B use this statement :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;LIBNAME r_thfcs "path_to_data" ACCESS=READONLY;

PROC SQL;
&amp;nbsp; &amp;nbsp;CREATE TABLE work.toto AS
&amp;nbsp; &amp;nbsp;SELECT *
&amp;nbsp; &amp;nbsp;FROM work.titi,
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; r_thfcs.tutu
&amp;nbsp; &amp;nbsp;;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But today, when job A run and try to update r_thfcs.tutu table, a lock was held by Job B !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it means PROC SQL is over READONLY access ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 08:24:11 GMT</pubDate>
    <dc:creator>CHUNantes</dc:creator>
    <dc:date>2022-08-30T08:24:11Z</dc:date>
    <item>
      <title>PROC SQL does not care of READONLY libname ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-does-not-care-of-READONLY-libname/m-p/831048#M328397</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have two jobs that can run in parallel some times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One job (A) will update a table and one job (B)&amp;nbsp; just need to read the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So to avoid lock, job B use this statement :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;LIBNAME r_thfcs "path_to_data" ACCESS=READONLY;

PROC SQL;
&amp;nbsp; &amp;nbsp;CREATE TABLE work.toto AS
&amp;nbsp; &amp;nbsp;SELECT *
&amp;nbsp; &amp;nbsp;FROM work.titi,
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; r_thfcs.tutu
&amp;nbsp; &amp;nbsp;;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But today, when job A run and try to update r_thfcs.tutu table, a lock was held by Job B !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it means PROC SQL is over READONLY access ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 08:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-does-not-care-of-READONLY-libname/m-p/831048#M328397</guid>
      <dc:creator>CHUNantes</dc:creator>
      <dc:date>2022-08-30T08:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL does not care of READONLY libname ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-does-not-care-of-READONLY-libname/m-p/831055#M328403</link>
      <description>&lt;P&gt;A READ lock is still a lock, if your other process need to update the table.&lt;/P&gt;
&lt;P&gt;If you need concurrent read and qrites on the same table you need to use either SAS/SHARE, SAS SPD Server or an external RDBMS.&lt;/P&gt;
&lt;P&gt;Another option is to schedule your jobs so thay don't access the table at the same time.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 09:59:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-does-not-care-of-READONLY-libname/m-p/831055#M328403</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-08-30T09:59:13Z</dc:date>
    </item>
  </channel>
</rss>

