<?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: failed to open file: The table myworlddata could not be located in caslib CASUSER in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/failed-to-open-file-The-table-myworlddata-could-not-be-located/m-p/783662#M249942</link>
    <description>&lt;P&gt;I add the below statement at the beginning of my code which seems to me a correct way of defining macro variables, but it does not work anyways.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%LET datadir = /Users/myemail@gmail.com/My Folder ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I guess the error you refer to as descriptive is the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt; Failed to open file '/Users/myemail@gmail.com/My Folder/WorldData.xlsx'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Well for me seems like the path is not formated properly but as I show you in the screenshot the file is there.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jejobo2340_0-1638458909489.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66340i6459369AD2BB502A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jejobo2340_0-1638458909489.png" alt="jejobo2340_0-1638458909489.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Dec 2021 15:29:43 GMT</pubDate>
    <dc:creator>jejobo2340</dc:creator>
    <dc:date>2021-12-02T15:29:43Z</dc:date>
    <item>
      <title>failed to open file: The table myworlddata could not be located in caslib CASUSER</title>
      <link>https://communities.sas.com/t5/SAS-Programming/failed-to-open-file-The-table-myworlddata-could-not-be-located/m-p/783625#M249920</link>
      <description>&lt;P&gt;I am running my first CAS code and I face an error. Seems like the file is not visible to CASLIB. I tried two different ways to address the path but both fails. Any hint?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");

caslib casuser list;

proc casutil;
load file="&amp;amp;datadir./WorldData.xlsx" casout="myworlddata";
contents casdata="myworlddata";
run;

proc casutil;
load file="/Users/myemail@gmail.com/My Folder/WorldData.xlsx" casout="myworlddata";
contents casdata="myworlddata";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;1    %studio_hide_wrapper;
77   
78   cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");
NOTE: 'CASUSER(myemail@gmail.com)' is now the active caslib.
NOTE: The CAS statement request to update one or more session options for session MYSESSION completed.
79   
80   caslib casuser list;
NOTE: Session = MYSESSION Name = CASUSER(myemail@gmail.com)
         Type = PATH
         Description = Personal File System Caslib
         Path = /cas/data/caslibs/casuserlibraries/myemail@gmail.com/
         Definition = 
         Subdirs = Yes
         Local = No
         Active = Yes
         Personal = Yes
NOTE: Action to LIST caslib CASUSER completed for session MYSESSION.
81   
82   proc casutil;
NOTE: The UUID '5fd75888-4c1a-c54b-9aba-f0539fe14771' is connected using session MYSESSION.
83   load file="&amp;amp;datadir./WorldData.xlsx" casout="myworlddata";
WARNING: Apparent symbolic reference DATADIR not resolved.
ERROR: Failed to open file '&amp;amp;datadir./WorldData.xlsx'.
84   contents casdata="myworlddata";
NOTE: The fileInfo action could not be run for the file "myworlddata".
ERROR: The table myworlddata could not be located in caslib CASUSER(myemail@gmail.com) of Cloud Analytic Services.
ERROR: The action stopped due to errors.
NOTE: Cloud Analytic Services processed the combined requests in 0.003561 seconds.
85   run;
86   
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE CASUTIL used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      
87   proc casutil;
NOTE: The UUID '5fd75888-4c1a-c54b-9aba-f0539fe14771' is connected using session MYSESSION.
88   load file="/Users/myemail@gmail.com/My Folder/WorldData.xlsx" casout="myworlddata";
ERROR: Failed to open file '/Users/myemail@gmail.com/My Folder/WorldData.xlsx'.
89   contents casdata="myworlddata";
NOTE: The fileInfo action could not be run for the file "myworlddata".
ERROR: The table myworlddata could not be located in caslib CASUSER(myemail@gmail.com) of Cloud Analytic Services.
ERROR: The action stopped due to errors.
NOTE: Cloud Analytic Services processed the combined requests in 0.002644 seconds.
90   run;
91   
92   
93   %studio_hide_wrapper;
101  
102  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 14:22:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/failed-to-open-file-The-table-myworlddata-could-not-be-located/m-p/783625#M249920</guid>
      <dc:creator>jejobo2340</dc:creator>
      <dc:date>2021-12-02T14:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: failed to open file: The table myworlddata could not be located in caslib CASUSER</title>
      <link>https://communities.sas.com/t5/SAS-Programming/failed-to-open-file-The-table-myworlddata-could-not-be-located/m-p/783638#M249930</link>
      <description>&lt;P&gt;Please take a look at your errors in the log, they are normally very descriptive and tell you why the code isn't working.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;WARNING: Apparent symbolic reference DATADIR not resolved.
ERROR: Failed to open file '&amp;amp;datadir./WorldData.xlsx'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is telling you that the macro variable datadir is not defined and the second line is telling you that it failed to find and open the file you are referencing.&lt;/P&gt;
&lt;P&gt;You have a similar type of error with the second proc casutil.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 15:01:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/failed-to-open-file-The-table-myworlddata-could-not-be-located/m-p/783638#M249930</guid>
      <dc:creator>CarmineVerrell</dc:creator>
      <dc:date>2021-12-02T15:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: failed to open file: The table myworlddata could not be located in caslib CASUSER</title>
      <link>https://communities.sas.com/t5/SAS-Programming/failed-to-open-file-The-table-myworlddata-could-not-be-located/m-p/783662#M249942</link>
      <description>&lt;P&gt;I add the below statement at the beginning of my code which seems to me a correct way of defining macro variables, but it does not work anyways.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%LET datadir = /Users/myemail@gmail.com/My Folder ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I guess the error you refer to as descriptive is the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt; Failed to open file '/Users/myemail@gmail.com/My Folder/WorldData.xlsx'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Well for me seems like the path is not formated properly but as I show you in the screenshot the file is there.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jejobo2340_0-1638458909489.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66340i6459369AD2BB502A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jejobo2340_0-1638458909489.png" alt="jejobo2340_0-1638458909489.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 15:29:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/failed-to-open-file-The-table-myworlddata-could-not-be-located/m-p/783662#M249942</guid>
      <dc:creator>jejobo2340</dc:creator>
      <dc:date>2021-12-02T15:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: failed to open file: The table myworlddata could not be located in caslib CASUSER</title>
      <link>https://communities.sas.com/t5/SAS-Programming/failed-to-open-file-The-table-myworlddata-could-not-be-located/m-p/783671#M249947</link>
      <description>&lt;P&gt;If your code or data is stored in the SAS Content/SAS Folder tree, then you can use the FILESRVC file access method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See here for an example:&amp;nbsp;&lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTarget=p0qapul7pyz9hmn0zfoefj0c278a.htm&amp;amp;locale=en#n0jkbbdvak6hann1og91a9o280rh" rel="nofollow noopener noreferrer"&gt;https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTa...&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 15:38:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/failed-to-open-file-The-table-myworlddata-could-not-be-located/m-p/783671#M249947</guid>
      <dc:creator>CarmineVerrell</dc:creator>
      <dc:date>2021-12-02T15:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: failed to open file: The table myworlddata could not be located in caslib CASUSER</title>
      <link>https://communities.sas.com/t5/SAS-Programming/failed-to-open-file-The-table-myworlddata-could-not-be-located/m-p/783686#M249957</link>
      <description>&lt;P&gt;Thanks to your hint, I tried the following code and it seems working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");


filename fileref  filesrvc folderpath='/Users/myemail@gmail.com/My Folder/' filename='WorldData.xlsx';

 proc import datafile=fileref out=casuser.WorldData(promote=yes)
        dbms=XLSX ;
 run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Another thing: strangely enough coping the file in the home directory, my code with casutil is working, here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc casutil;
load file="/home/myemail@gmail.com/WorldData.xlsx" casout="myworlddata" replace;
contents casdata="myworlddata";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So seems like there is something wrong with the visibility of&amp;nbsp;&lt;CODE class=""&gt;Users/myemail@gmail.com/ to&amp;nbsp;casutil.&amp;nbsp;I&amp;nbsp;am&amp;nbsp;interested&amp;nbsp;to&amp;nbsp;know&amp;nbsp;how&amp;nbsp;to&amp;nbsp;fix&amp;nbsp;it.&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The example I tried to run with casutil proc is found here on page 8: &lt;A href="https://support.sas.com/content/dam/SAS/support/en/books/free-books/exploring-sas-viya.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/content/dam/SAS/support/en/books/free-books/exploring-sas-viya.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jejobo2340_0-1638460340625.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66342iAB29382FB065B8C2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jejobo2340_0-1638460340625.png" alt="jejobo2340_0-1638460340625.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 16:15:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/failed-to-open-file-The-table-myworlddata-could-not-be-located/m-p/783686#M249957</guid>
      <dc:creator>jejobo2340</dc:creator>
      <dc:date>2021-12-02T16:15:42Z</dc:date>
    </item>
  </channel>
</rss>

