<?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 to load a column from a CSV file into a sas array? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163597#M42419</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Despite the title on your post it looks like you already have the data in a data set.&amp;nbsp; What do you mean by wanting to create an array? &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; If you explain the larger picture of what you are trying to do then someone might be able suggest a method.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Feb 2014 14:03:50 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2014-02-05T14:03:50Z</dc:date>
    <item>
      <title>How to load a column from a CSV file into a sas array?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163595#M42417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The dataset is WORK.HOLIDAYS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like this:&lt;/P&gt;&lt;P&gt;HOLIDAY&lt;/P&gt;&lt;P&gt;1/1/2014&lt;/P&gt;&lt;P&gt;31/1/2014&lt;/P&gt;&lt;P&gt;14/2/2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I load this dataset into any array?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 09:30:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163595#M42417</guid>
      <dc:creator>hellind</dc:creator>
      <dc:date>2014-02-05T09:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to load a column from a CSV file into a sas array?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163596#M42418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is basic SAS programming, and you'll find your answer in the documentation or in training material.&lt;/P&gt;&lt;P&gt;Question is, what is the requirement for your question?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 10:24:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163596#M42418</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-02-05T10:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to load a column from a CSV file into a sas array?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163597#M42419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Despite the title on your post it looks like you already have the data in a data set.&amp;nbsp; What do you mean by wanting to create an array? &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; If you explain the larger picture of what you are trying to do then someone might be able suggest a method.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 14:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163597#M42419</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-02-05T14:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to load a column from a CSV file into a sas array?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163598#M42420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THanks for the help. After spending some time, this is what I ended up with and it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT CAT("'", PUT(HOLIDATE,DATE9.),"'D") INTO&amp;nbsp; :HOLIDAYLIST SEPARATED BY ',' FROM SMLS.HOLIDAYS&lt;/P&gt;&lt;P&gt;;QUIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA SMLS.CA1;&lt;/P&gt;&lt;P&gt;SET SMLS.CA;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HOLIDAY = 0;&lt;/P&gt;&lt;P&gt;DO HOLIDATE = &amp;amp;HOLIDAYLIST;&lt;/P&gt;&lt;P&gt;IF DATEPART(LAST_UPDATE_DATE) &amp;lt; HOLIDATE AND DATEPART(FIRST_UPDATE_DATE) &amp;gt; HOLIDATE THEN HOLIDAY = HOLIDAY + 1;&lt;/P&gt;&lt;P&gt;END;&lt;/P&gt;&lt;P&gt;IF HOLIDAY &amp;gt;=1 THEN SLA = SLA - (24*HOLIDAY);&lt;/P&gt;&lt;P&gt;OUTPUT;&lt;/P&gt;&lt;P&gt;DROP HOLIDATE&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 10:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163598#M42420</guid>
      <dc:creator>hellind</dc:creator>
      <dc:date>2014-02-11T10:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to load a column from a CSV file into a sas array?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163599#M42421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically counting the number of public holidays between the start date and end date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 10:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163599#M42421</guid>
      <dc:creator>hellind</dc:creator>
      <dc:date>2014-02-11T10:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to load a column from a CSV file into a sas array?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163600#M42422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That isn't an array, that's a macro variable list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arrays in SAS operate differently than other languages, so its worth reading the documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 15:40:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163600#M42422</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-02-11T15:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to load a column from a CSV file into a sas array?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163601#M42423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No need for macro variables to do that logic.&amp;nbsp; You can read directly from the source table by using POINT= option on SET statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DATA SMLS.CA1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; SET SMLS.CA;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; HOLIDAY = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; DO p=1 to nobs ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET SMLS.HOLIDAYS(keep=HOLIDATE) point=p nobs=nobs ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF DATEPART(LAST_UPDATE_DATE) &amp;lt; HOLIDATE AND DATEPART(FIRST_UPDATE_DATE) &amp;gt; HOLIDATE &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; THEN HOLIDAY = HOLIDAY + 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; END;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; IF HOLIDAY &amp;gt;=1 THEN SLA = SLA - (24*HOLIDAY);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; DROP HOLIDATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 15:48:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-load-a-column-from-a-CSV-file-into-a-sas-array/m-p/163601#M42423</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-02-11T15:48:20Z</dc:date>
    </item>
  </channel>
</rss>

