<?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: Referencing file stored under SAS Content (SAS Viya) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816175#M322116</link>
    <description>&lt;P&gt;A sas7bdat file is a SAS data set. In oder to access it one needs a SAS libref pointing to the directory where this file is stored. A LIBNAME statement can not point to a folder in SAS Content. So you need to make a binary copy of the file. see the code below for an example. Please be aware that the value used for LRECL= must be big enough to &lt;SPAN&gt;accommodate the size of the file.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
 * make a binary copy of the file from SAS Content
 * to the directory the work library is pointing to
 */

%let lrecl= %eval(1024 * 1024 * 1024 -1 );
options msglevel=i;

filename src filesrvc folderpath='/Public' name="cars.sas7bdat" recfm=n lrecl=&amp;amp;lrecl;

filename dest "%sysfunc(pathname(work))/newcars.sas7bdat" recfm=n lrecl=&amp;amp;lrecl;

data _null_;
  rc = fcopy("src", "dest");
run;
data newcars2;
  set work.newcars;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 02 Jun 2022 10:04:07 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2022-06-02T10:04:07Z</dc:date>
    <item>
      <title>Referencing file stored under SAS Content (SAS Viya)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816103#M322085</link>
      <description>&lt;P&gt;Working on a script in SAS VIYA and want to refer a sas7bdat file stored under SAS Content &amp;gt; Public. Not sure how to find the path and I tried using FILESRVC option but it runs and the log says 1 observation and 0 variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename jjj filesrvc folderpath='/Public';&lt;/P&gt;&lt;P&gt;data mydata;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;infile jjj('xxxxx');&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;input;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 20:02:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816103#M322085</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2022-06-01T20:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing file stored under SAS Content (SAS Viya)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816175#M322116</link>
      <description>&lt;P&gt;A sas7bdat file is a SAS data set. In oder to access it one needs a SAS libref pointing to the directory where this file is stored. A LIBNAME statement can not point to a folder in SAS Content. So you need to make a binary copy of the file. see the code below for an example. Please be aware that the value used for LRECL= must be big enough to &lt;SPAN&gt;accommodate the size of the file.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
 * make a binary copy of the file from SAS Content
 * to the directory the work library is pointing to
 */

%let lrecl= %eval(1024 * 1024 * 1024 -1 );
options msglevel=i;

filename src filesrvc folderpath='/Public' name="cars.sas7bdat" recfm=n lrecl=&amp;amp;lrecl;

filename dest "%sysfunc(pathname(work))/newcars.sas7bdat" recfm=n lrecl=&amp;amp;lrecl;

data _null_;
  rc = fcopy("src", "dest");
run;
data newcars2;
  set work.newcars;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Jun 2022 10:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816175#M322116</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2022-06-02T10:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing file stored under SAS Content (SAS Viya)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816201#M322129</link>
      <description>&lt;P&gt;??&amp;nbsp; Why should you have to set a large LRECL?&amp;nbsp; Why would it matter with RECFM=N?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have had no trouble just use RECFM=F LRECL=512 as a default way to get SAS to copy binary files.&lt;/P&gt;
&lt;P&gt;Does that not work in this case?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 14:43:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816201#M322129</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-06-02T14:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing file stored under SAS Content (SAS Viya)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816442#M322252</link>
      <description>&lt;P&gt;i tried this and this seems to work. thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 20:50:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816442#M322252</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2022-06-03T20:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing file stored under SAS Content (SAS Viya)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816444#M322254</link>
      <description>&lt;P&gt;thanks for the explaining this.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 20:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816444#M322254</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2022-06-03T20:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing file stored under SAS Content (SAS Viya)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816616#M322351</link>
      <description>&lt;P&gt;Thanks for the tip, I can confirm it works with your options very well. Advantage you do not have to care about the size of the file.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 10:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/816616#M322351</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2022-06-06T10:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing file stored under SAS Content (SAS Viya)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/817135#M322535</link>
      <description>&lt;P&gt;I had a follow-up question.&lt;/P&gt;&lt;P&gt;If I have to create an external CSS stylesheet (.css or .txt) in HTML form, where should I save this .txt file and how should I refer this?&lt;/P&gt;&lt;P&gt;&amp;lt;head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link rel="stylesheet" type="text/css" href=&lt;FONT color="#FF0000"&gt;"/.............txt" /&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried saving in the work location&amp;nbsp;but it does not seem to work. Any thoughts on how you would approach this in SAS Viya 3.5?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 15:49:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-file-stored-under-SAS-Content-SAS-Viya/m-p/817135#M322535</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2022-06-08T15:49:41Z</dc:date>
    </item>
  </channel>
</rss>

