<?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: transfer the dataset to memory in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332888#M74971</link>
    <description>&lt;P&gt;thanks! as i knew little about the 'memory',actually, it is the RAM which you have mentioned above.&lt;/P&gt;&lt;P&gt;and i try the code like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let dsets = a ;&lt;BR /&gt;libname TEMP 'C:\Windows\TEMP' ACCESS=TEMP;&lt;BR /&gt;data temp.TEST_ML;&lt;BR /&gt;set &amp;amp;dsets;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry for another question,is the TEMP &amp;nbsp;'cache' for sas? &amp;nbsp;someone has told me that delete the 'temp' folder when you finished your work. i did not know the reson.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2017 03:24:43 GMT</pubDate>
    <dc:creator>JNWong</dc:creator>
    <dc:date>2017-02-15T03:24:43Z</dc:date>
    <item>
      <title>transfer the dataset to memory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332871#M74963</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i am wondering how to transfer the dataset to memory, now i have a dataset in sas library, i am expected to transfer it to memory, &amp;nbsp;it is my professer's suggestion, and i never try to do it before.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i knew that the stata operated in the memory. i have no idea about sas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the 'memory' &amp;nbsp;just is the thing displayed in the windows task manager.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 02:31:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332871#M74963</guid>
      <dc:creator>JNWong</dc:creator>
      <dc:date>2017-02-15T02:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: transfer the dataset to memory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332879#M74965</link>
      <description>&lt;P&gt;There's no point in transferring a data set to memory unless you plan to access it multiple times within your sas program.&amp;nbsp; After all it has to be read from disk at least once.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But there is a way to load into memory.&amp;nbsp;&amp;nbsp;Take a look at documentation of the sasfile statement &lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#n0osyhi338pfaan1plin9ioilduk.htm" target="_self"&gt;sasfile statement&lt;/A&gt;.&amp;nbsp; It includes an example of "using sasfile in a program with multiple steps".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, be aware of limitations.&amp;nbsp; There are limited ways to modify the contens of a dataset loaded into memory via the sasfile statement.&amp;nbsp; The table below has a list of limitations:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="tgroup" cellspacing="0" summary="Processing Requests for a File Opened by SASFILE"&gt;&lt;CAPTION class="xis-title"&gt;Processing Requests for a File Opened by &lt;FONT style="background-color: rgb(252, 222, 192);"&gt;SASFILE&lt;/FONT&gt;&lt;/CAPTION&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p1tx3m7nniz4y6n15h6dtsuwyven" target="_blank"&gt;&lt;/A&gt;Processing Request&lt;/DIV&gt;
&lt;/TH&gt;
&lt;TH valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n1pa5ppv7su2nsn1q3us7ielc255" target="_blank"&gt;&lt;/A&gt;Open Mode&lt;/DIV&gt;
&lt;/TH&gt;
&lt;TH valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n0b91euqbncsbrn1l99htj44k35s" target="_blank"&gt;&lt;/A&gt;Allowed&lt;/DIV&gt;
&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n0z0ym8m4lzx8vn1uqs8czqeuo64" target="_blank"&gt;&lt;/A&gt;APPEND procedure&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p1h5d58ej1opwkn1gmzelk3b9who" target="_blank"&gt;&lt;/A&gt;update&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p08ez6oaqz6zcjn1v4tmi1h3d1ky" target="_blank"&gt;&lt;/A&gt;Yes&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n0mp2212xr1ql9n1ohctec16l9mo" target="_blank"&gt;&lt;/A&gt;DATA step that creates or replaces the file&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p1jbmwrxzuwk4tn1hb39rckidimt" target="_blank"&gt;&lt;/A&gt;output&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p0asm96jr0h9n5n183drv7kxaa64" target="_blank"&gt;&lt;/A&gt;No&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n05h3tgx6v1votn1uvhgvyu265eb" target="_blank"&gt;&lt;/A&gt;DATASETS procedure to rename or add a variable, add or change a label, or add or remove integrity constraints or indexes&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n0ekb4xnr00zvfn0zf1ww2tdap38" target="_blank"&gt;&lt;/A&gt;utility&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n1q2grmadyyy6on1m0nxvg46nhuq" target="_blank"&gt;&lt;/A&gt;No&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p1foh8i1ua3555n1uvd37vyt3xg4" target="_blank"&gt;&lt;/A&gt;DATASETS procedure with AGE, CHANGE, or DELETE statements&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n1q0op4oxpmxjln1u4sq5p5d5ox2" target="_blank"&gt;&lt;/A&gt;does not open the file but requires exclusive access&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p115pm022kei1qn1l4tuud5886ao" target="_blank"&gt;&lt;/A&gt;No&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p1qfget25tzscln1sgyb55xftcka" target="_blank"&gt;&lt;/A&gt;FSEDIT procedure&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n03tu6hqyp0ip9n1pgdwe3u7nmym" target="_blank"&gt;&lt;/A&gt;update&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n0nbg75qpohx9pn1h1nc1pw6tdw3" target="_blank"&gt;&lt;/A&gt;Yes&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p19wrq5su2hylcn18r5zn9yfgopx" target="_blank"&gt;&lt;/A&gt;PRINT procedure&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p0fyqv08duhpdfn11oqqpol54xoi" target="_blank"&gt;&lt;/A&gt;input&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n0nxaji2fazetfn140pseseyhyn2" target="_blank"&gt;&lt;/A&gt;Yes&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n1bvbcae56d5ycn1cva8w6e2mxzl" target="_blank"&gt;&lt;/A&gt;SORT procedure that replaces original data set with sorted one&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p19hhiimw9bjxwn1a74wr6fd1yom" target="_blank"&gt;&lt;/A&gt;output&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p0e6cnmtfbwxvyn19a1siz85ar7d" target="_blank"&gt;&lt;/A&gt;No&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p1hdtv4rfw877bn1fys640mc2onc" target="_blank"&gt;&lt;/A&gt;SQL procedure to modify, add, or delete observations&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p0f0rtnlhv3zzan1blam6r2lqtpd" target="_blank"&gt;&lt;/A&gt;update&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p1v6bmkb2j0hy3n1muchisvbvkt1" target="_blank"&gt;&lt;/A&gt;Yes&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n0lcyo8drlhga9n0zioxyat8ibvt" target="_blank"&gt;&lt;/A&gt;SQL procedure with CREATE TABLE or CREATE VIEW statement&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n0ehdscd8sxzahn1sl2qqaupibsr" target="_blank"&gt;&lt;/A&gt;output&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p1od9ri27xzp4xn1w14m7t2xzzul" target="_blank"&gt;&lt;/A&gt;No&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n1aqawq6nkg82yn16p3az6llc6fd" target="_blank"&gt;&lt;/A&gt;SQL procedure to create or remove integrity constraints or indexes&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="p10cp65dxyuhwrn19uz4775i6ars" target="_blank"&gt;&lt;/A&gt;utility&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD valign="top" style="text-align: left;"&gt;
&lt;DIV class="xis-paraTableFirst"&gt;&lt;A id="n0bw718icgqhmgn105h6ut8hqyt2" target="_blank"&gt;&lt;/A&gt;No&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;DIV class="xis-subTopic"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 02:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332879#M74965</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-02-15T02:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: transfer the dataset to memory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332882#M74967</link>
      <description>&lt;P&gt;I'm guessing you likely mean you want to permanently save the dataset so you don't have to reimport it rather than actually save it to 'memory' which would usually be understood to be RAM.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do this by first assigning a permanent library and then copying the file to that location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname MEM '/folders/myfolders/perm';

data mem.class;
set sashelp.class;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Remember, that to access the data in the future you'll need to re-assign the library if you haven't set it to be assigned automatically at start up.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 03:13:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332882#M74967</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-02-15T03:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: transfer the dataset to memory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332888#M74971</link>
      <description>&lt;P&gt;thanks! as i knew little about the 'memory',actually, it is the RAM which you have mentioned above.&lt;/P&gt;&lt;P&gt;and i try the code like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let dsets = a ;&lt;BR /&gt;libname TEMP 'C:\Windows\TEMP' ACCESS=TEMP;&lt;BR /&gt;data temp.TEST_ML;&lt;BR /&gt;set &amp;amp;dsets;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry for another question,is the TEMP &amp;nbsp;'cache' for sas? &amp;nbsp;someone has told me that delete the 'temp' folder when you finished your work. i did not know the reson.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 03:24:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332888#M74971</guid>
      <dc:creator>JNWong</dc:creator>
      <dc:date>2017-02-15T03:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: transfer the dataset to memory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332891#M74972</link>
      <description>&lt;P&gt;Temp in this case is a library and the data is not deleted. Typically SAS datasets without a two level name (ie no libname) are stored in the WORK library. Anything in the work library is erased when you end your SAS session.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are trying to work in RAM, my first answer/code is incorrect.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're trying to work in memory, maybe you should explain what you want to do in memory. Is it a lookup, merge, sort?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm assuming this is an attempt to improve performance?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 03:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332891#M74972</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-02-15T03:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: transfer the dataset to memory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332892#M74973</link>
      <description>&lt;P&gt;yeah, i want to improve the performance. and use the ram, sorry i called it 'memory'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think the path&amp;nbsp;TEMP 'C:\Windows\TEMP' &amp;nbsp;(which used to set up the 'temp' to use the RAM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as&amp;nbsp;&lt;SPAN&gt;'C:\Windows\TEMP' this folder &amp;nbsp;already &amp;nbsp;exists there, maybe made automatically by sas. i am wondering if &amp;nbsp;this folder can be used to transfer the dataset to ram. or i should set up a new folder named 'temp' in 'c' &amp;nbsp; and change the path like'c:\temp'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 03:44:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/transfer-the-dataset-to-memory/m-p/332892#M74973</guid>
      <dc:creator>JNWong</dc:creator>
      <dc:date>2017-02-15T03:44:34Z</dc:date>
    </item>
  </channel>
</rss>

