<?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: New SAS user in need of help in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/New-SAS-user-in-need-of-help/m-p/942832#M42335</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Let's say I have 3 SAS datasets:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;students&lt;/FONT&gt;.sas7bdat&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;teachers&lt;/FONT&gt;.sas7bdat&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;courses&lt;/FONT&gt;.sas7bdat&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And that these 3 datasets are physically stored in these possible locations/operating systems:&lt;BR /&gt;1) SAS On Windows on my local machine:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;C:\Schools\K_12\Douglas&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Then the LIBNAME statement would be:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;libname &lt;FONT color="#339966"&gt;Douglas&lt;/FONT&gt; 'c:\Schools\K_12\Douglas';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) SAS On Windows, but mapped to my Q:drive&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Q:\user111\Schools\K_12\Douglas&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Then the LIBNAME statement would be:&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;libname &lt;FONT color="#339966"&gt;Douglas&lt;/FONT&gt; 'q:\user111\Schools\K_12\Douglas';&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) SAS on a Unix/Linux server on a local network:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;/home/usr/bin/usr111/Schools/K_12/Douglas&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Then the LIBNAME statement would be:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;libname &lt;FONT color="#339966"&gt;Douglas&lt;/FONT&gt; '/home/usr/bin/usr111/Schools/K_12/Douglas';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4) SAS used with SAS OnDemand for Academics under a users Files (Home) top folder:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;/home/u12345678/Schools/K_12/Douglas&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Then the LIBNAME statement would be:&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;libname &lt;FONT color="#339966"&gt;Douglas&lt;/FONT&gt; '/home/u12345678/Schools/K_12/Douglas';&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Notice how each libname statement uses a "nickname" or library reference called &lt;STRONG&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;Douglas &lt;/FONT&gt;&lt;/STRONG&gt;in order to provide a reference that will point to that physical location on each operating system.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, no matter which operating system my files are physically stored on, this code below would work the same if run on each operating system, assuming the correct LIBNAME statement had been issued prior to running the steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; In this case, since the files are permanently stored in a physical location on my operating system and since I now want to use SAS procedures with the SAS data, I can use a 2-level name in my SAS code to point to the specific SAS data table and SAS will know where to get the data from the folder location specified in the LIBNAME statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;proc contents data=&lt;FONT color="#339966"&gt;douglas&lt;/FONT&gt;.&lt;FONT color="#FF00FF"&gt;students&lt;/FONT&gt;;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;title 'Show information about students at Douglas';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;proc print data=&lt;FONT color="#339966"&gt;douglas&lt;/FONT&gt;.&lt;FONT color="#FF00FF"&gt;teachers&lt;/FONT&gt;;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;title 'Display a list of teachers at Douglas Elementary';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;proc freq data=&lt;FONT color="#339966"&gt;douglas&lt;/FONT&gt;.&lt;FONT color="#FF00FF"&gt;courses&lt;/FONT&gt;;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;title 'Show how many courses in each grade_level at Douglas';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;tables grade_level/ nocum nopercent;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps get you started. Our Programming 1 class goes into some detail about the LIBNAME statement to read SAS data and the XLSX Libname engine to read Excel files and helps you learn how to read CSV files and import them into SAS format. It's a free class and might be worth reviewing.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
    <pubDate>Fri, 06 Sep 2024 02:04:21 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2024-09-06T02:04:21Z</dc:date>
    <item>
      <title>New SAS user in need of help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-SAS-user-in-need-of-help/m-p/942829#M42334</link>
      <description>Im a new SAS user and need help creating a library. Im a grad student and I need all the help you all can offer!</description>
      <pubDate>Fri, 06 Sep 2024 01:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-SAS-user-in-need-of-help/m-p/942829#M42334</guid>
      <dc:creator>KKinslow79</dc:creator>
      <dc:date>2024-09-06T01:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: New SAS user in need of help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-SAS-user-in-need-of-help/m-p/942832#M42335</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Let's say I have 3 SAS datasets:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;students&lt;/FONT&gt;.sas7bdat&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;teachers&lt;/FONT&gt;.sas7bdat&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF00FF"&gt;courses&lt;/FONT&gt;.sas7bdat&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And that these 3 datasets are physically stored in these possible locations/operating systems:&lt;BR /&gt;1) SAS On Windows on my local machine:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;C:\Schools\K_12\Douglas&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Then the LIBNAME statement would be:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;libname &lt;FONT color="#339966"&gt;Douglas&lt;/FONT&gt; 'c:\Schools\K_12\Douglas';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) SAS On Windows, but mapped to my Q:drive&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Q:\user111\Schools\K_12\Douglas&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Then the LIBNAME statement would be:&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;libname &lt;FONT color="#339966"&gt;Douglas&lt;/FONT&gt; 'q:\user111\Schools\K_12\Douglas';&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) SAS on a Unix/Linux server on a local network:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;/home/usr/bin/usr111/Schools/K_12/Douglas&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Then the LIBNAME statement would be:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;libname &lt;FONT color="#339966"&gt;Douglas&lt;/FONT&gt; '/home/usr/bin/usr111/Schools/K_12/Douglas';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4) SAS used with SAS OnDemand for Academics under a users Files (Home) top folder:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;/home/u12345678/Schools/K_12/Douglas&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Then the LIBNAME statement would be:&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;libname &lt;FONT color="#339966"&gt;Douglas&lt;/FONT&gt; '/home/u12345678/Schools/K_12/Douglas';&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Notice how each libname statement uses a "nickname" or library reference called &lt;STRONG&gt;&lt;FONT face="courier new,courier" color="#339966"&gt;Douglas &lt;/FONT&gt;&lt;/STRONG&gt;in order to provide a reference that will point to that physical location on each operating system.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, no matter which operating system my files are physically stored on, this code below would work the same if run on each operating system, assuming the correct LIBNAME statement had been issued prior to running the steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; In this case, since the files are permanently stored in a physical location on my operating system and since I now want to use SAS procedures with the SAS data, I can use a 2-level name in my SAS code to point to the specific SAS data table and SAS will know where to get the data from the folder location specified in the LIBNAME statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;proc contents data=&lt;FONT color="#339966"&gt;douglas&lt;/FONT&gt;.&lt;FONT color="#FF00FF"&gt;students&lt;/FONT&gt;;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;title 'Show information about students at Douglas';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;proc print data=&lt;FONT color="#339966"&gt;douglas&lt;/FONT&gt;.&lt;FONT color="#FF00FF"&gt;teachers&lt;/FONT&gt;;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;title 'Display a list of teachers at Douglas Elementary';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;proc freq data=&lt;FONT color="#339966"&gt;douglas&lt;/FONT&gt;.&lt;FONT color="#FF00FF"&gt;courses&lt;/FONT&gt;;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;title 'Show how many courses in each grade_level at Douglas';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;tables grade_level/ nocum nopercent;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps get you started. Our Programming 1 class goes into some detail about the LIBNAME statement to read SAS data and the XLSX Libname engine to read Excel files and helps you learn how to read CSV files and import them into SAS format. It's a free class and might be worth reviewing.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 02:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-SAS-user-in-need-of-help/m-p/942832#M42335</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2024-09-06T02:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: New SAS user in need of help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-SAS-user-in-need-of-help/m-p/942898#M42355</link>
      <description>&lt;P&gt;You will want to make sure that the path for the library location starts at Drive (windows) or disc mount point or root of your access. If the path does not specify such then you would get a path relative to a possibly changing disc location, such as where SAS is executing, and not where you intend.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also you need to have permission to read that location and if you want to create data sets write permissions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your SAS session is running from a server the path needs to be as the SAS server sees things. Which means that it may not see your local hard drive.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 14:15:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-SAS-user-in-need-of-help/m-p/942898#M42355</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-06T14:15:27Z</dc:date>
    </item>
  </channel>
</rss>

