<?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: CASLIB= data set option for caslibs longer than 8 characters in Developers</title>
    <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/674058#M889</link>
    <description>hi Joe,&lt;BR /&gt;Yes it worked! , I marked it as a solution as well.&lt;BR /&gt;Thank you for the follow-up&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 03 Aug 2020 06:13:25 GMT</pubDate>
    <dc:creator>WaelAburezeq</dc:creator>
    <dc:date>2020-08-03T06:13:25Z</dc:date>
    <item>
      <title>CASLIB= data set option for caslibs longer than 8 characters</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669817#M852</link>
      <description>&lt;P&gt;Hi fellows,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am facing an error due to my libname (that is used for scoring purposes) exceed 8 characters. And thus, I can't append any table to the targeted one. The error is as follow :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;curl -X POST \
https://casserver/cas/sessions/{{sessionid}}/actions/runCode \
-H 'Authorization: Bearer ey...' \
-H 'Content-Type: application/json' \
-d '{"code": "data Analytic_Scoring.LAB_RESULTS_CLASSIFICATION(append=force) ; set Analytic_Scoring.data201902;run;"}'&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;"&lt;SPAN style="font-family: inherit;"&gt;ERROR:&amp;nbsp;Caslib&amp;nbsp;'Analytic_Scoring'&amp;nbsp;exceeds&amp;nbsp;8&amp;nbsp;characters.&amp;nbsp;&amp;nbsp;Use&amp;nbsp;the&amp;nbsp;CASLIB=&amp;nbsp;data&amp;nbsp;set&amp;nbsp;option&amp;nbsp;for&amp;nbsp;caslibs&amp;nbsp;longer&amp;nbsp;than&amp;nbsp;8&amp;nbsp;characters"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN style="font-family: inherit;"&gt;The same happens in SAS Studio. However, I was able to create a smaller reference and that worked.&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mycas cas caslib=Analytic_Scoring;&lt;BR /&gt;Data&amp;nbsp;Mycas.table_name&amp;nbsp;etc&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN style="font-family: inherit;"&gt;And then using mycas reference in SAS Studio. BUT, the same sentence is not working in the following script:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE style="font-family: inherit;"&gt;curl -X POST \
  https://casserver/cas/sessions/{{sessionid}}/actions/runCode \
  -H 'Authorization: Bearer ey...' \
  -H 'Content-Type: application/json' \
  -d '{"code": "&lt;FONT color="#FF0000"&gt;libname mycas cas caslib=Analytic_Scoring&lt;/FONT&gt;;"}'&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="inherit"&gt;I get &lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN style="font-family: inherit;"&gt;ERROR:&amp;nbsp;Statement&amp;nbsp;is&amp;nbsp;not&amp;nbsp;valid&amp;nbsp;or&amp;nbsp;it&amp;nbsp;is&amp;nbsp;used&amp;nbsp;out&amp;nbsp;of&amp;nbsp;proper&amp;nbsp;order"&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="inherit"&gt;I don't want to keep creating &lt;/FONT&gt;temporally&lt;FONT face="inherit"&gt;&amp;nbsp;cas lib as well.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="inherit"&gt;Going back to the first error and &lt;A href="https://documentation.sas.com/?docsetId=casref&amp;amp;docsetTarget=n0tbd0ypnflsqjn1ti6nwu61uaqi.htm&amp;amp;docsetVersion=3.1&amp;amp;locale=en#n00kxgcbowyfnvn17qzafirwyw5w" target="_self"&gt;this documentation&lt;/A&gt;&amp;nbsp;, what does &lt;FONT color="#FF0000"&gt;"&lt;FONT color="#0000FF"&gt;Caslib= data set option for caslib longer than 8 characters&lt;/FONT&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN style="font-family: inherit;"&gt;refer to? how can I apply it?&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 07:12:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669817#M852</guid>
      <dc:creator>WaelAburezeq</dc:creator>
      <dc:date>2020-07-16T07:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: CASLIB= data set option for caslibs longer than 8 characters</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669900#M854</link>
      <description>&lt;P&gt;I don't have any experience using long CAS librefs, but I looked at the doc and here's what I think is happening:&lt;/P&gt;
&lt;P&gt;1. The LIBNAME statement is a global statement. It is not a DATA step statement, which is why you get an error when you try to run it in the runCode action.&lt;/P&gt;
&lt;P&gt;2. As far as I can tell, the runCode action does not support CAS librefs that exceed 8 characters, which is what the first part of the error message is telling you. However, the second part of the error message is meant for the DATA step, which supports the CASLIB= data set option and which you can use to specify longer CAS librefs.&lt;/P&gt;
&lt;P&gt;3. The simplest (and maybe) only way to use the action is to use an 8-character libref.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. If you are submitting your code from a SAS session, you could use the longer libref, but you would have to use the DATA step syntax, not the runCode action.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 15:24:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669900#M854</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-07-16T15:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: CASLIB</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669903#M856</link>
      <description>Thank you so much for your reply. The point is I can't rename the library,&lt;BR /&gt;and I can't just replace it since it contains lot of previous work. How can&lt;BR /&gt;I use data step in run.code and in the same time create a reference library&lt;BR /&gt;the same way I did in SAS studio?&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Jul 2020 15:31:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669903#M856</guid>
      <dc:creator>WaelAburezeq</dc:creator>
      <dc:date>2020-07-16T15:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: CASLIB</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669935#M858</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt; &lt;EM&gt;The point is I can't rename the library&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;1. You can define a new libref that points to the same CAS library and session.&lt;/P&gt;
&lt;P&gt;2. I don't know what you are trying to accomplish, but your example is transferring a SAS data set into a CAS table. If that is your goal, you do not need to use the DATA step (or runCode action). You can &lt;A href="https://go.documentation.sas.com/?docsetId=casref&amp;amp;docsetVersion=3.4&amp;amp;docsetTarget=n1lmowayn4qghtn18lj7kupsdzi7.htm&amp;amp;locale=en" target="_self"&gt;use PROC CASUTIL&lt;/A&gt; (UNTESTED code):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;proc casutil ;
   load data=Analytic_Scoring.LAB_RESULTS_CLASSIFICATION outcaslib="Analytic_Scoring" casout="data201902" append ;
run ;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can &lt;A href="https://blogs.sas.com/content/sgf/2017/11/15/concurrent-data-append-and-update-to-a-global-cas-table/" target="_self"&gt;read more about PROC CASUTIL and appending data.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's still not clear to me how you are submitting actions. Several of your examples appear to use a REST api, so I'll call&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/214450"&gt;@joeFurbee&lt;/a&gt;&amp;nbsp;to see if he has additional suggestions.&amp;nbsp; Good luck!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 17:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669935#M858</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-07-16T17:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: CASLIB</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669943#M859</link>
      <description>Yes, you are right! I am using REST API.&lt;BR /&gt;&lt;BR /&gt;I am trying to dynamically add rows to target table then do the scoring&lt;BR /&gt;(model.run). The cas library reference that you mentioned is a solution- as&lt;BR /&gt;first highlighted in my email- however this requires keep creating temp&lt;BR /&gt;libraries and deleting them in every session.&lt;BR /&gt;&lt;BR /&gt;Do you think that PROC CASUTIL willl work instead of data step in .run_code&lt;BR /&gt;action? I will give it a try, but I am afraid that we will fave the same&lt;BR /&gt;libname issue (exceeding 8 characters)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Jul 2020 17:59:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669943#M859</guid>
      <dc:creator>WaelAburezeq</dc:creator>
      <dc:date>2020-07-16T17:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: CASLIB= data set option for caslibs longer than 8 characters</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669944#M860</link>
      <description>&lt;P&gt;follow the example in :&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=casref&amp;amp;docsetTarget=n0lgusu0v43zxwn1kc5m6cvtnzey.htm&amp;amp;docsetVersion=3.4&amp;amp;locale=en" target="_self"&gt;https://documentation.sas.com/?docsetId=casref&amp;amp;docsetTarget=n0lgusu0v43zxwn1kc5m6cvtnzey.htm&amp;amp;docsetVersion=3.4&amp;amp;locale=en&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try by example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;caslib Analytic_Scoring path="&amp;lt;your_path&amp;gt;"
                         datasource=(srctype="&amp;lt;source_type&amp;gt;");  
libname mycas cas caslib=Analytic_Scoring;
data mycas.LAB_RESULTS_CLASSIFICATION(append=force); 
set Analytic_Scoring.data201902;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jul 2020 17:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/669944#M860</guid>
      <dc:creator>sotojcr</dc:creator>
      <dc:date>2020-07-16T17:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: CASLIB</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/670452#M872</link>
      <description>&lt;P&gt;when I ran the PROC CASUTIL, I got the followings:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Libref 'Analytic_Scoring' exceeds 8 characters&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Which seems to be very similar to the Data Step error&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 14:15:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/670452#M872</guid>
      <dc:creator>WaelAburezeq</dc:creator>
      <dc:date>2020-07-19T14:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: CASLIB= data set option for caslibs longer than 8 characters</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/670453#M873</link>
      <description>&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;libname&amp;nbsp;mycas&amp;nbsp;cas&amp;nbsp;caslib=Analytic_Scoring; in CAS REST API of {{sascasserver}}:8777/cas/sessions/{{sessionid}}/&lt;FONT color="#FF0000"&gt;actions/runCode&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;returned this error:&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM style="color: #ff0000; font-family: inherit;"&gt;&lt;STRONG&gt;Statement is not valid or it is used out of proper order&lt;/STRONG&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;that's the main point behind this post, however whenever I use the rest of your code (either data step or Proc CASUTIL) in Analytic_Scoring.TABLE_NAME, the error says:&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;Caslib&amp;nbsp;'Analytic_Scoring'&amp;nbsp;exceeds&amp;nbsp;8&amp;nbsp;characters.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;Use&amp;nbsp;the&amp;nbsp;CASLIB=&amp;nbsp;data&amp;nbsp;set&amp;nbsp;option&amp;nbsp;for&amp;nbsp;caslibs&amp;nbsp;longer&amp;nbsp;than&amp;nbsp;8&amp;nbsp;characters.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 14:20:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/670453#M873</guid>
      <dc:creator>WaelAburezeq</dc:creator>
      <dc:date>2020-07-19T14:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: CASLIB= data set option for caslibs longer than 8 characters</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/671207#M884</link>
      <description>&lt;P&gt;I tried this with PROC CAS and the dataStep.runCode action, so it should be similar to using the runCode action with REST.&lt;/P&gt;
&lt;P&gt;Instead of using a two-level name, use the table name alone and specify the caslib name in a data set option.&lt;/P&gt;
&lt;PRE&gt;data LAB_RESULTS_CLASSIFICATION(append=force caslib=Analytic_Scoring) ; set data201902(caslib=Analytic_Scoring);run;&lt;/PRE&gt;
&lt;P&gt;I _predict_ that should work.&amp;nbsp; That prediction is based on what I managed to get working for myself.&lt;/P&gt;
&lt;PRE&gt;cas casauto;

caslib averylongcaslibname datasource=(srctype="path") 
path="/tmp";

/* The active caslib is set to averylong... */
proc casutil;
  load data=sashelp.cars;
run;

proc cas;
  datastep.runcode /  code="
data longishtablename(append=yes caslib=averylongcaslibname);
  set cars(caslib=averylongcaslibname);
run;";
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 20:35:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/671207#M884</guid>
      <dc:creator>MikeMcKiernan</dc:creator>
      <dc:date>2020-07-21T20:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: CASLIB= data set option for caslibs longer than 8 characters</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/673120#M885</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/161470"&gt;@WaelAburezeq&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Have you been able to attempt the recommendation from &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/275"&gt;@MikeMcKiernan&lt;/a&gt;? Can we accept that as the solution? Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 13:42:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/673120#M885</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2020-07-29T13:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: CASLIB= data set option for caslibs longer than 8 characters</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/674057#M888</link>
      <description>Thumps up !&lt;BR /&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Mon, 03 Aug 2020 06:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/674057#M888</guid>
      <dc:creator>WaelAburezeq</dc:creator>
      <dc:date>2020-08-03T06:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: CASLIB= data set option for caslibs longer than 8 characters</title>
      <link>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/674058#M889</link>
      <description>hi Joe,&lt;BR /&gt;Yes it worked! , I marked it as a solution as well.&lt;BR /&gt;Thank you for the follow-up&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Aug 2020 06:13:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/CASLIB-data-set-option-for-caslibs-longer-than-8-characters/m-p/674058#M889</guid>
      <dc:creator>WaelAburezeq</dc:creator>
      <dc:date>2020-08-03T06:13:25Z</dc:date>
    </item>
  </channel>
</rss>

