<?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: How do I use a file saved in my library in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833439#M659</link>
    <description>I already have the file stored in my library and saved to folder compost named compiled. When i open it it gives me my table. I need to be able to insert my table into my program so i can run code on it. So instead of hand typing the hundreds of lines what is the notation for adding the file i have saved in my library?</description>
    <pubDate>Wed, 14 Sep 2022 20:40:20 GMT</pubDate>
    <dc:creator>anthonysimerlin</dc:creator>
    <dc:date>2022-09-14T20:40:20Z</dc:date>
    <item>
      <title>How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833428#M655</link>
      <description>&lt;P&gt;DATA SoilData;&lt;BR /&gt;INPUT Year $ Sample $ Treatment $ Salts $ OM $ NH4 $ NO3 $ P $ @@;&lt;BR /&gt;compost.compiled;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;PROC Print data=SoilData;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;I get an error message&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR 557-185: Variable compost is not an object.&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Sep 2022 20:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833428#M655</guid>
      <dc:creator>anthonysimerlin</dc:creator>
      <dc:date>2022-09-14T20:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833433#M656</link>
      <description>&lt;P&gt;Your first set of code doesn't specify an input location of where to get the data from.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;INPUT implies you're trying to read from a text file originally?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 20:29:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833433#M656</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-09-14T20:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833434#M657</link>
      <description>&lt;P&gt;If you want to use an existing data set in a data step you would typically use SET libname.datasetname.&lt;/P&gt;
&lt;P&gt;Other statements that may be used to bring in data from existing data sets would be MERGE, to combine data record by record from two or more sets, and UPDATE or MODIFY for specific approaches to changing values of variables when the new value are in a separate data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The particular error you show is because you used a code construct with a point between elements that SAS cannot recognize what you intended.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 20:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833434#M657</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-09-14T20:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833435#M658</link>
      <description>&lt;P&gt;How to use a file you have that already exists, SAS7BDAT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Path to where the files are stored;
libname myFiles '/home/fkhurshed/Demo1/';

*creates a data set called Sample in the work library;
Data sample;
set myFIles.inputData; *assigns it the data set inputData from the myFiles folder;
run;

*use the file directly without creating a temporary copy;
proc freq data=myFiles.inputData;
table Age Sex;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If it's a text file, you first need to import it into SAS then you can use it.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 20:35:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833435#M658</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-09-14T20:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833439#M659</link>
      <description>I already have the file stored in my library and saved to folder compost named compiled. When i open it it gives me my table. I need to be able to insert my table into my program so i can run code on it. So instead of hand typing the hundreds of lines what is the notation for adding the file i have saved in my library?</description>
      <pubDate>Wed, 14 Sep 2022 20:40:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833439#M659</guid>
      <dc:creator>anthonysimerlin</dc:creator>
      <dc:date>2022-09-14T20:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833440#M660</link>
      <description>I am using an excel file i have imported into sas and then saved to my library. I am trying to have the table it generates show up in sas so i can run analytics on it. does that make sense?</description>
      <pubDate>Wed, 14 Sep 2022 20:44:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833440#M660</guid>
      <dc:creator>anthonysimerlin</dc:creator>
      <dc:date>2022-09-14T20:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833441#M661</link>
      <description>It is an excel file. I have read and watched videos online on how to import data into sas which i can do. The problem i have is what do you do once it is saved in sas. How do you access it to run code on it. Instead of hand typing the data i should be able to reference it. But when i do i get this error code.</description>
      <pubDate>Wed, 14 Sep 2022 20:45:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833441#M661</guid>
      <dc:creator>anthonysimerlin</dc:creator>
      <dc:date>2022-09-14T20:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833444#M662</link>
      <description>&lt;P&gt;So instead of the myFiles library in my example use the compiled library.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What is the data set name?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would not be using any INPUT if the data set is already created, only the SET statement as in the example posted.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
set sashelp.class;
run;

proc freq data=sashelp.class;
table age sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Sep 2022 20:51:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833444#M662</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-09-14T20:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833446#M663</link>
      <description>When i run this line&lt;BR /&gt;data SoilAnaylsis;&lt;BR /&gt;set compost.compiled;&lt;BR /&gt;run;&lt;BR /&gt;it then gives me the error&lt;BR /&gt;The table "WORK.SOILANAYLSIS" cannot be opened because it does not contain any columns.&lt;BR /&gt;&lt;BR /&gt;which is why i input the column names</description>
      <pubDate>Wed, 14 Sep 2022 20:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833446#M663</guid>
      <dc:creator>anthonysimerlin</dc:creator>
      <dc:date>2022-09-14T20:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833448#M664</link>
      <description>for some reason my table didnt have columns. So i reimported the table and now it is working.</description>
      <pubDate>Wed, 14 Sep 2022 20:58:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833448#M664</guid>
      <dc:creator>anthonysimerlin</dc:creator>
      <dc:date>2022-09-14T20:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833449#M665</link>
      <description>&lt;P&gt;The only reason that the dataset&amp;nbsp;&lt;SPAN&gt;SOILANAYLSIS created by the data step:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data SoilAnaylsis;
  set compost.compiled;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Would not have any variables would be if the input dataset COMPOST.COMPILED did not have any varaibles.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You probably overwrote your dataset in your earlier attempts.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Recreate it by re-running the code you use to create it from the EXCEL in the first place.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then try your simple data step that makes a copy of it into the new dataset SOILANALYSIS again.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 21:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833449#M665</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-09-14T21:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833450#M666</link>
      <description>exactly. Thank you for your help.</description>
      <pubDate>Wed, 14 Sep 2022 21:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833450#M666</guid>
      <dc:creator>anthonysimerlin</dc:creator>
      <dc:date>2022-09-14T21:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a file saved in my library</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833451#M667</link>
      <description>thank you for your help!</description>
      <pubDate>Wed, 14 Sep 2022 21:04:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-do-I-use-a-file-saved-in-my-library/m-p/833451#M667</guid>
      <dc:creator>anthonysimerlin</dc:creator>
      <dc:date>2022-09-14T21:04:48Z</dc:date>
    </item>
  </channel>
</rss>

