<?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: Referring to a list in a folder in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Referring-to-a-list-in-a-folder/m-p/107801#M22413</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/* find a way to put all the IDs in a dataset */&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input cid $@@;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;000361&amp;nbsp; 000957&amp;nbsp;&amp;nbsp; 001031 001055 001204 00163U&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;/* create macro variable clist */&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt; select quote(cid) into :clist separated by ',' from have ;&lt;/P&gt;&lt;P&gt; quit;&lt;/P&gt;&lt;P&gt;/******************************/ &lt;/P&gt;&lt;P&gt;libname mylib "C:\Data";&lt;/P&gt;&lt;P&gt;rsubmit;&lt;/P&gt;&lt;P&gt;data stockprice;&lt;/P&gt;&lt;P&gt;set crsp.dsf;&lt;/P&gt;&lt;P&gt;where cusip in (&amp;amp;clist);&lt;/P&gt;&lt;P&gt;keep prc cusip ret;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;. and so on&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Jun 2013 19:48:22 GMT</pubDate>
    <dc:creator>Linlin</dc:creator>
    <dc:date>2013-06-14T19:48:22Z</dc:date>
    <item>
      <title>Referring to a list in a folder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referring-to-a-list-in-a-folder/m-p/107800#M22412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a little probleme with SAS in connection with WRDS. I need to download for a large number of firms some stock data. For all the firms I have the cusip. So far I downloaded the data using this code and it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;libname mylib &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"C:\Data"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;rsubmit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;%let clist = '000361' '000957' '001031' '001055' '001204' '00163U';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;data stockprice;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;set crsp.dsf;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;where cusip in (&amp;amp;clist);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;keep prc cusip ret;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;. and so on&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;But now I have to do the same download for thousands of firms. Is there a possibility to save a txt or sas7bdat file which contains the cusip's and to tell SAS that it should use this file in order to download the data from &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;the WRDS server? In this way I do not have to copy the cusips in the download code and it would be much more easy to make the download.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Many thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 19:32:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referring-to-a-list-in-a-folder/m-p/107800#M22412</guid>
      <dc:creator>mexes</dc:creator>
      <dc:date>2013-06-14T19:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Referring to a list in a folder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referring-to-a-list-in-a-folder/m-p/107801#M22413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/* find a way to put all the IDs in a dataset */&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input cid $@@;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;000361&amp;nbsp; 000957&amp;nbsp;&amp;nbsp; 001031 001055 001204 00163U&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;/* create macro variable clist */&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt; select quote(cid) into :clist separated by ',' from have ;&lt;/P&gt;&lt;P&gt; quit;&lt;/P&gt;&lt;P&gt;/******************************/ &lt;/P&gt;&lt;P&gt;libname mylib "C:\Data";&lt;/P&gt;&lt;P&gt;rsubmit;&lt;/P&gt;&lt;P&gt;data stockprice;&lt;/P&gt;&lt;P&gt;set crsp.dsf;&lt;/P&gt;&lt;P&gt;where cusip in (&amp;amp;clist);&lt;/P&gt;&lt;P&gt;keep prc cusip ret;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;. and so on&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 19:48:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referring-to-a-list-in-a-folder/m-p/107801#M22413</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2013-06-14T19:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Referring to a list in a folder</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referring-to-a-list-in-a-folder/m-p/107802#M22414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using call execute() .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2013 05:36:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referring-to-a-list-in-a-folder/m-p/107802#M22414</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-06-17T05:36:06Z</dc:date>
    </item>
  </channel>
</rss>

