<?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: Writing to a non standard caslib in data step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805858#M317459</link>
    <description>&lt;P&gt;1.&amp;nbsp;&lt;SPAN&gt;How did the "My CAS" caslib get defined?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;2. If you run the following code, does the log verify that the value of the VALIDVARNAME option is 'ANY'?&lt;BR /&gt;&lt;STRONG&gt;proc options option=validvarname value;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;For example, the output might look like this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Option Value Information For SAS Option VALIDVARNAME&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Value: &lt;STRONG&gt;ANY&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Scope: Compute Server&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Apr 2022 14:20:58 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2022-04-04T14:20:58Z</dc:date>
    <item>
      <title>Writing to a non standard caslib in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805851#M317454</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS VIYA:&amp;nbsp; &amp;nbsp;3.5&lt;/P&gt;
&lt;P&gt;SAS Studio: 5.2&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has anyone managed to write to a non standard caslib in a data step?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried the following but it returns error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data "My CAS".table;&lt;/P&gt;
&lt;P&gt;set casuser.table1;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am aware that it is possible to do it in a proc fedsql.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc fedsql sessref=test;&lt;/P&gt;
&lt;P&gt;create table&amp;nbsp;"My CAS".table as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;select * from&amp;nbsp;&lt;/P&gt;
&lt;P&gt;casuser.table1;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;smm662002&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 13:46:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805851#M317454</guid>
      <dc:creator>smm662002</dc:creator>
      <dc:date>2022-04-04T13:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to a non standard caslib in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805854#M317455</link>
      <description>&lt;P&gt;How did the "My CAS" caslib get defined? Does it show up if you list all caslibs by using&lt;/P&gt;
&lt;PRE class="sas"&gt;caslib &lt;SPAN&gt;_all_&lt;/SPAN&gt; &lt;SPAN&gt;list&lt;/SPAN&gt;;   &lt;SPAN&gt;/* display all caslibs to log */&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;I have never done it, but the SAS documentation states: "You can use name literals (n-literals) in caslib names. However, the CAS LIBNAME engine statement does not support caslib names with name literals in them."&lt;/P&gt;
&lt;P&gt;To me, this suggests that you might try&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data "My CAS"n.table;&lt;BR /&gt;&lt;SPAN&gt;...&lt;BR /&gt;&lt;/SPAN&gt;run;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;because "My CAS"n is the standard way to specify an n-literal.&amp;nbsp; Let us know if that works or not.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 13:58:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805854#M317455</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-04-04T13:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to a non standard caslib in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805855#M317456</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thank you for your reply.&lt;BR /&gt;The caslib shows up in the list when using calib _all_ list but when trying to use data "My CAS"n.table;&lt;BR /&gt;...&lt;BR /&gt;run;&lt;BR /&gt;it returns an error saying that the Libref exceeds 8 characters (because the libname I am using has more than 8 characters)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;smm662002&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 04 Apr 2022 14:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805855#M317456</guid>
      <dc:creator>smm662002</dc:creator>
      <dc:date>2022-04-04T14:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to a non standard caslib in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805858#M317459</link>
      <description>&lt;P&gt;1.&amp;nbsp;&lt;SPAN&gt;How did the "My CAS" caslib get defined?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;2. If you run the following code, does the log verify that the value of the VALIDVARNAME option is 'ANY'?&lt;BR /&gt;&lt;STRONG&gt;proc options option=validvarname value;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;For example, the output might look like this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Option Value Information For SAS Option VALIDVARNAME&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Value: &lt;STRONG&gt;ANY&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Scope: Compute Server&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 14:20:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805858#M317459</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-04-04T14:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to a non standard caslib in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805859#M317460</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The CASLIB  was defined by the SAS admin so not sure exactly how they have done it.&lt;BR /&gt;The log verify that the value of the VALIDVARNAME option is 'ANY' but this is on the Compute Server while the code would run on CAS server.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;smm662002</description>
      <pubDate>Mon, 04 Apr 2022 14:26:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805859#M317460</guid>
      <dc:creator>smm662002</dc:creator>
      <dc:date>2022-04-04T14:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to a non standard caslib in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805867#M317462</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;but this is on the Compute Server while the code would run on CAS server.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Not quite true. All PROCs and DATA steps are parsed on the compute server, and so the librefs and caslibs have to be defined there. Your code executes on the client, but if all data are in CAS tables, then it results in a call to the dataStep.runCode action, which will actually perform the data processing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know how to resolve your problem by using the DATA step. However, if your goal is to create a new table, you could&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/casref/p1momv516ndlt7n1vhgva4urpuk6.htm" target="_self"&gt; use the LOAD statement in PROC CASUTIL&lt;/A&gt; or directly call the&amp;nbsp;table.loadtable action by using PROC CAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't test this code since I don't know how to define a "My CAS" caslib, but does the following code show your data table?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* UNTESTED code */
proc casutil;
list tables incaslib="My CAS";  /* does this work? */
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If so, try&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* if so, try to transfer it to caseuser.table1 */
proc casutil;
load casdata='table' incaslib="My CAS"
     casout='table1' outcaslib='casuser';
list tables incaslib='casuser'; 
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 15:02:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805867#M317462</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-04-04T15:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to a non standard caslib in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805874#M317464</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;proc casutil;&lt;BR /&gt;list tables incaslib="My CAS";  /* does this work? */&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;works ok.&lt;BR /&gt;&lt;BR /&gt;The goal was to find if I can use nonstandard caslibs in data steps. Otherwise I can always use fedsql if needed.&lt;BR /&gt;&lt;BR /&gt;Thank you for your help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;smm662002</description>
      <pubDate>Mon, 04 Apr 2022 15:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805874#M317464</guid>
      <dc:creator>smm662002</dc:creator>
      <dc:date>2022-04-04T15:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to a non standard caslib in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805876#M317466</link>
      <description>&lt;P&gt;I am out of ideas. Perhaps&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/41748"&gt;@alexal&lt;/a&gt;&amp;nbsp;or someone else can assist.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 15:33:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/805876#M317466</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-04-04T15:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to a non standard caslib in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/806027#M317531</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1962"&gt;@smm662002&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please show the library definition and exact error you are receiving when using data step.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 11:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-non-standard-caslib-in-data-step/m-p/806027#M317531</guid>
      <dc:creator>alexal</dc:creator>
      <dc:date>2022-04-05T11:28:08Z</dc:date>
    </item>
  </channel>
</rss>

