<?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 same proc import code outputs to WORK from a program file but in WEBWORK with a copy of that code in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348029#M2236</link>
    <description>&lt;P&gt;Greetings to the SAS Studio saviours out there! Hope someone can help out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought I was just starting to get the hang of SAS Studio&amp;nbsp;but got stumped by something probably trivial but that I can't figure out!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the following proc import code to import a dataset:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc import datafile="/folders/myfolders/myfile.CSV"&lt;/P&gt;&lt;P&gt;OUT=myworkfile&lt;/P&gt;&lt;P&gt;DBMS=CSV&lt;/P&gt;&lt;P&gt;REPLACE;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this code was in a program file containing other code but I only highlighted the code above and hit the run button, e.g. without running anything else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had previously used the libname statement in that program file to create the library STUDYFILES.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to tidy things up, I created a separate program file to copy and paste the successful code into, but re-running the exact same&amp;nbsp;code from the new program file, I don't get the output data tab&amp;nbsp;and&amp;nbsp;I discovered the file output to WEBWORK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code I get when I get the output data is logged&amp;nbsp;as follows:&lt;/P&gt;&lt;DIV class="sasNote"&gt;NOTE: WORK.myworkfile&amp;nbsp;data set was successfully created.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The data set WORK.STUDYFILES has 879&amp;nbsp;observations and 12&amp;nbsp;variables.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;when I run the same code from the new program file I get the following log:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;DIV class="sasNote"&gt;USER.STUDYFILES data set was successfully created.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The data set USER.STUDYFILES&amp;nbsp;has 879&amp;nbsp;observations and 12&amp;nbsp;variables.&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone explain what is happening? Is it to do with the fact that if there are two programs I am trying to use then they can't both output to work if the code is the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance guys.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Apr 2017 09:01:13 GMT</pubDate>
    <dc:creator>gabyelle</dc:creator>
    <dc:date>2017-04-07T09:01:13Z</dc:date>
    <item>
      <title>same proc import code outputs to WORK from a program file but in WEBWORK with a copy of that code</title>
      <link>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348029#M2236</link>
      <description>&lt;P&gt;Greetings to the SAS Studio saviours out there! Hope someone can help out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought I was just starting to get the hang of SAS Studio&amp;nbsp;but got stumped by something probably trivial but that I can't figure out!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the following proc import code to import a dataset:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc import datafile="/folders/myfolders/myfile.CSV"&lt;/P&gt;&lt;P&gt;OUT=myworkfile&lt;/P&gt;&lt;P&gt;DBMS=CSV&lt;/P&gt;&lt;P&gt;REPLACE;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this code was in a program file containing other code but I only highlighted the code above and hit the run button, e.g. without running anything else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had previously used the libname statement in that program file to create the library STUDYFILES.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to tidy things up, I created a separate program file to copy and paste the successful code into, but re-running the exact same&amp;nbsp;code from the new program file, I don't get the output data tab&amp;nbsp;and&amp;nbsp;I discovered the file output to WEBWORK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code I get when I get the output data is logged&amp;nbsp;as follows:&lt;/P&gt;&lt;DIV class="sasNote"&gt;NOTE: WORK.myworkfile&amp;nbsp;data set was successfully created.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The data set WORK.STUDYFILES has 879&amp;nbsp;observations and 12&amp;nbsp;variables.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;when I run the same code from the new program file I get the following log:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;DIV class="sasNote"&gt;USER.STUDYFILES data set was successfully created.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The data set USER.STUDYFILES&amp;nbsp;has 879&amp;nbsp;observations and 12&amp;nbsp;variables.&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone explain what is happening? Is it to do with the fact that if there are two programs I am trying to use then they can't both output to work if the code is the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance guys.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 09:01:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348029#M2236</guid>
      <dc:creator>gabyelle</dc:creator>
      <dc:date>2017-04-07T09:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: same proc import code outputs to WORK from a program file but in WEBWORK with a copy of that cod</title>
      <link>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348036#M2237</link>
      <description>&lt;P&gt;I may have made progress on this - I found the SAS Studio User Guide (version 4.2) and found out that if I swich the interactive mode OFF (I forgot I had it on to avoid overwriting&amp;nbsp;log), then the results are stored in WORK and not WEBWORK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, also the original program file that stored data into WORK is set to be in interactive mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder if using interactive mode is good for a beginner after all - I was reading that it keeps the code in memory until a new PROC or a data step are used . That might explain why I thought SAS Studio was having me on - perhaps best to switch if off until I&amp;nbsp;am in the learning phase?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suggestions/ comment from experienced folks would be great!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 09:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348036#M2237</guid>
      <dc:creator>gabyelle</dc:creator>
      <dc:date>2017-04-07T09:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: same proc import code outputs to WORK from a program file but in WEBWORK with a copy of that cod</title>
      <link>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348070#M2242</link>
      <description>&lt;P&gt;I find interactive mode easier to work with but there are some best practices to help make this better. It's good that you found the error, and working in multiple modes may be a bit confusing but knowing the difference is also a good idea. In the long run you'll be a better programmer. That being said, use the method that will be used most frequently when you're 'fully trained'. If that's batch processing then go with that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 13:13:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348070#M2242</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-07T13:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: same proc import code outputs to WORK from a program file but in WEBWORK with a copy of that cod</title>
      <link>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348337#M2256</link>
      <description>&lt;P&gt;Hi Reeza&lt;/P&gt;&lt;P&gt;thanks for your reply. Basically using interactive mode is best when you are more experinced as you may not reaize how many actions you set in motion whilst you are busy trying to&amp;nbsp;figure things out?&lt;/P&gt;&lt;P&gt;Would you then recommend beginners not use the interactive mode until they are confident of having mastered all the basic skills?&lt;/P&gt;&lt;P&gt;I will look up batch processing &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 23:58:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348337#M2256</guid>
      <dc:creator>gabyelle</dc:creator>
      <dc:date>2017-04-07T23:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: same proc import code outputs to WORK from a program file but in WEBWORK with a copy of that cod</title>
      <link>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348341#M2257</link>
      <description>&lt;P&gt;Normally when you use a one level name SAS will take it to mean a dataset in the WORK libref.&lt;/P&gt;
&lt;P&gt;But if you have defined a USER libref then SAS will treat that one level name as being in the USER libref.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So whatever you did to change your sessions settings has made SAS think that you want to use USER instead of WORK for one level names. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to force it to always write to the WORK libref then use a two level name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="/folders/myfolders/myfile.CSV"
  OUT=WORK.myworkfile replace
  DBMS=CSV
;
RUN;
 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Apr 2017 00:45:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348341#M2257</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-08T00:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: same proc import code outputs to WORK from a program file but in WEBWORK with a copy of that cod</title>
      <link>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348366#M2259</link>
      <description>&lt;P&gt;Thank you - that makes completely sense!&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2017 04:36:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/same-proc-import-code-outputs-to-WORK-from-a-program-file-but-in/m-p/348366#M2259</guid>
      <dc:creator>gabyelle</dc:creator>
      <dc:date>2017-04-08T04:36:42Z</dc:date>
    </item>
  </channel>
</rss>

