<?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: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696033#M212504</link>
    <description>&lt;P&gt;Thanks - that worked. Next step - nothing seems to be working as the book tells me it will - is to extract US records from the dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code so far:&lt;/P&gt;&lt;P&gt;FILENAME COVID1 url '&lt;A href="https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv" target="_blank"&gt;https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv&lt;/A&gt;';&lt;BR /&gt;PROC IMPORT DATAFILE=in DBMS=CSV OUT= COVID1;&lt;/P&gt;&lt;P&gt;DATA COVID1US1;&lt;BR /&gt;SET COVID1;&lt;BR /&gt;IF COUNTRY = "United States";&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Log says that "57409 observations read" from the original file, and that the new data file was created, but has "0 observations and 22 variables."&amp;nbsp;&lt;BR /&gt;Thanks in advance for your patience and expertise.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Nov 2020 21:01:19 GMT</pubDate>
    <dc:creator>Newtrix</dc:creator>
    <dc:date>2020-11-02T21:01:19Z</dc:date>
    <item>
      <title>Can one upload github database directly onto SAS, or do I need to save it to my hard drive first?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/694804#M211929</link>
      <description />
      <pubDate>Wed, 28 Oct 2020 11:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/694804#M211929</guid>
      <dc:creator>Newtrix</dc:creator>
      <dc:date>2020-10-28T11:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/694816#M211935</link>
      <description>&lt;P&gt;Not sure what you are trying to accomplish here. If you want to use GitHub in the usual way for versioning files, you should use the &lt;A href="https://www.youtube.com/watch?v=CZwT7kxmBmw" target="_self"&gt;GUI interface available in SAS Studio or Enterprise Guide&lt;/A&gt;, or &lt;A href="https://blogs.sas.com/content/sasdummy/2019/01/17/git-in-sas/" target="_self"&gt;the SAS functions designed for that&lt;/A&gt; to manage that. If you just want to access a file directly in a SAS program, that can be done. For example, I have a bunch of&amp;nbsp; SAS macro code I share on GitHub. Say you wanted to use my DATA2DATASTEP macro. The macro takes an existing data set and creates a DATA program that will re-create the dataset when executed. (Great for sharing a bit of data with your code when asking questions here on SAS Communities &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;) The shared macros are stored at&amp;nbsp;&lt;A href="https://github.com/SASJedi/sas-macros" target="_blank" rel="noopener"&gt;https://github.com/SASJedi/sas-macros.&lt;/A&gt;&amp;nbsp;To use a file from the Internet in your code, you'll want the RAW version, not the HTML. By clicking around on GitHub, you can find the URL for the raw file (&lt;A href="https://raw.githubusercontent.com/SASJedi/sas-macros/master/data2datastep.sas" target="_blank" rel="noopener"&gt;https://raw.githubusercontent.com/SASJedi/sas-macros/master/data2datastep.sas&lt;/A&gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;Now to run that file as code in my SAS session:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Point a fileref to the RAW github file */
filename mycode url "https://raw.githubusercontent.com/SASJedi/sas-macros/master/data2datastep.sas";
/* Use %INCLUDE to run the code in your SAS session */
%include mycode;

/* Test the macro */
%data2datastep(?)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The test of the macro will yield syntax help in the SAS log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; NOTE: DATA2DATASTEP macro help document:
       Purpose: Converts a data set to a SAS DATA step.
       Syntax: %DATA2DATASTEP(dsn&amp;lt;,lib,outlib,file,obs,fmt,lbl&amp;gt;)
       dsn:    Name of the dataset to be converted. Required.
       lib:    LIBREF of the original dataset. (Optional - if DSN is not fully qualified)
       outlib: LIBREF for the output dataset. (Optional - default is WORK)
       file:   Fully qualified filename for the DATA step code produced. (Optional)
               Default is create_&amp;amp;outlib._&amp;amp;dsn._data.sas in the SAS default directory.
       obs:    Max observations to include the created dataset.
               (Optional) Default is MAX (all observations)
       fmt:    Format the numeric variables in the output dataset like the original data set?
               (YES|NO - Optional) Default is YES
       lbl:    Reproduce column labels in the output dataset?
               (YES|NO - Optional) Default is YES&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May the SAS be with you!&lt;BR /&gt;Mark&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 11:57:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/694816#M211935</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2020-10-28T11:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695039#M212032</link>
      <description>&lt;P&gt;Thanks for responding. Not sure I'm doing anything quite so involved. Pretty much a rank novice at this point. All I'm trying to do is to upload a CSV file from a GitHub location onto SAS Studio (using University Edition) so I can poke around and have a look. File location is&amp;nbsp;&lt;A href="https://github.com/owid/covid-19-data/blob/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv" target="_blank"&gt;https://github.com/owid/covid-19-data/blob/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your help. Thanks again.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 20:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695039#M212032</guid>
      <dc:creator>Newtrix</dc:creator>
      <dc:date>2020-10-28T20:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695109#M212059</link>
      <description>&lt;P&gt;Not too sure what you are after, but have looked at the GIT functions, such as GIT_FETCH?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 07:38:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695109#M212059</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-10-29T07:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695121#M212064</link>
      <description>&lt;P&gt;The git interface in SAS Studio or Enterprise Guide (and the GIT_ functions) is for programs, but you are asking about a data file here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For this, you can use &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTarget=p103pi2vrzn6qhn1e8alrs01jrb7.htm&amp;amp;locale=de" target="_blank" rel="noopener"&gt;FILENAME URL&lt;/A&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename in url 'https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv';

data test;
length line $100;
infile in truncover;
input line $100.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that I first navigated to the link you posted, and then copied the link of the "Download" button there.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695121#M212064</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-29T09:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695816#M212382</link>
      <description>&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 03:20:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695816#M212382</guid>
      <dc:creator>Newtrix</dc:creator>
      <dc:date>2020-11-02T03:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695817#M212383</link>
      <description>&lt;P&gt;Thanks - I now have the file uploaded but the readout is still CSV. How do I change it to a table format?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 03:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695817#M212383</guid>
      <dc:creator>Newtrix</dc:creator>
      <dc:date>2020-11-02T03:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695819#M212384</link>
      <description>&lt;P&gt;I added a line to the code which I thought would take care of it but it didn't work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FILENAME in url '&lt;A href="https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv" target="_blank"&gt;https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv&lt;/A&gt;';&lt;/P&gt;&lt;P&gt;data COVID1;&lt;BR /&gt;length line $100;&lt;BR /&gt;infile in truncover DLM=',';&lt;BR /&gt;input line $100.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=covid1 (OBS=100);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 03:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695819#M212384</guid>
      <dc:creator>Newtrix</dc:creator>
      <dc:date>2020-11-02T03:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695820#M212385</link>
      <description>Use proc import to create the skeleton data step code, and alter it to ensure it reads the data as desired.&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Nov 2020 04:03:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695820#M212385</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-02T04:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695837#M212392</link>
      <description>&lt;P&gt;My code was only for diagnostic purposes. You can use the file reference in the infile statement and add options like DLM=',' and DSD to read the file as if it was local, with delimited INPUT.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 07:28:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/695837#M212392</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-02T07:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696033#M212504</link>
      <description>&lt;P&gt;Thanks - that worked. Next step - nothing seems to be working as the book tells me it will - is to extract US records from the dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code so far:&lt;/P&gt;&lt;P&gt;FILENAME COVID1 url '&lt;A href="https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv" target="_blank"&gt;https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv&lt;/A&gt;';&lt;BR /&gt;PROC IMPORT DATAFILE=in DBMS=CSV OUT= COVID1;&lt;/P&gt;&lt;P&gt;DATA COVID1US1;&lt;BR /&gt;SET COVID1;&lt;BR /&gt;IF COUNTRY = "United States";&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Log says that "57409 observations read" from the original file, and that the new data file was created, but has "0 observations and 22 variables."&amp;nbsp;&lt;BR /&gt;Thanks in advance for your patience and expertise.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 21:01:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696033#M212504</guid>
      <dc:creator>Newtrix</dc:creator>
      <dc:date>2020-11-02T21:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696037#M212507</link>
      <description>Your  where  clause is wrong then. Do a proc freq on country to see the values.  &lt;BR /&gt;</description>
      <pubDate>Mon, 02 Nov 2020 21:25:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696037#M212507</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-02T21:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696066#M212521</link>
      <description>&lt;P&gt;Ok, new issue. Before I could get the subset straightened out, I had to re-upload the file. I should mention that I'm running on UE. The code and log:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;73 FILENAME COVID1 url&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73 ! '&lt;A href="https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv" target="_blank" rel="noopener"&gt;https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv&lt;/A&gt;';&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74 PROC IMPORT DATAFILE=in DBMS=CSV OUT= COVID1;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 RUN;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;WORK.PARMS.PARMS.SLIST.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/IN.&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Import unsuccessful. See SAS Log for details.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why does it no longer work? Thanks-&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 01:06:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696066#M212521</guid>
      <dc:creator>Newtrix</dc:creator>
      <dc:date>2020-11-03T01:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696080#M212533</link>
      <description>&lt;P&gt;The way you have written this you are trying to read in a CSV file called IN from your current SAS session directory:&amp;nbsp;&lt;SPAN&gt;/opt/sasinside/SASConfig/Lev1/SASApp&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Then you are trying to write this out to GITHUB. The file IN does not exist. What are you actually intending to do?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 02:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696080#M212533</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-11-03T02:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696081#M212534</link>
      <description>&lt;P&gt;Oh - duh. Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 02:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696081#M212534</guid>
      <dc:creator>Newtrix</dc:creator>
      <dc:date>2020-11-03T02:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696085#M212536</link>
      <description>&lt;P&gt;Thanks, that was helpful. Now 2 issues - 1) need to increase a variable length 2) need to extract "United States" WITHOUT including "United States Virgin Islands".&lt;/P&gt;&lt;P&gt;Code so far, which did nothing for the length - still truncated at 11. Tried to get it as early in the DATA statement as SAS would accept it but no dice:&lt;/P&gt;&lt;PRE&gt;FILENAME COVID1 url 'https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv';&lt;BR /&gt;PROC IMPORT DATAFILE=COVID1 DBMS=CSV OUT= COVID1;&lt;BR /&gt;DATA COVID1;&lt;BR /&gt;	LENGTH Country $25;&lt;BR /&gt;	SET COVID1;&lt;BR /&gt;RUN;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Nov 2020 03:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696085#M212536</guid>
      <dc:creator>Newtrix</dc:creator>
      <dc:date>2020-11-03T03:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696098#M212545</link>
      <description>&lt;P&gt;Don't use PROC IMPORT for CSV files, it's not necessary. Write thaedata step yourself, according to the documentation of the CSV file. No need to put up with the guessing of IMPORT.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 05:42:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696098#M212545</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-03T05:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696103#M212548</link>
      <description>&lt;P&gt;There is a trick to this. Run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options source;
PROC IMPORT DATAFILE=COVID1 DBMS=CSV OUT= COVID1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then check your SAS log. Do you see DATA step code there? If so do a block copy (hold Alt key and mark code block to copy with mouse, then Ctrl C, Ctrl V) to paste that back into your program editor where you can fine-tune variable lengths etc. Now run your corrected DATA step code instead of PROC IMPORT.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 06:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696103#M212548</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-11-03T06:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696169#M212597</link>
      <description>&lt;P&gt;The PROC IMPORT was how I finally got the file to read as a table. Nothing else worked to get rid of the commas. I'm on to the next issue now. Remedial help (I am a novice) is appreciated. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 12:36:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696169#M212597</guid>
      <dc:creator>Newtrix</dc:creator>
      <dc:date>2020-11-03T12:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can one upload github database directly onto SAS, or do I need to save it to my hard drive first</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696180#M212602</link>
      <description>&lt;P&gt;A short look at the file lets you see that you have a character value called country, and a lot of numeric values.&lt;/P&gt;
&lt;P&gt;So we first take the first line and copy it to our program editor:&lt;/P&gt;
&lt;PRE&gt;Country,Year,School closures (OxBSG),Workplace Closures (OxBSG),Cancel public events (OxBSG),Restrictions on gatherings (OxBSG),Close public transport (OxBSG),Stay at home requirements (OxBSG),Restrictions on internal movement (OxBSG),International travel controls (OxBSG),Income support (OxBSG),Debt/contract relief (OxBSG),Fiscal measures (OxBSG),International support (OxBSG),Public information campaigns (OxBSG),Testing policy (OxBSG),Contact tracing (OxBSG),Emergency investment in health care (OxBSG),Investment in Vaccines (OxBSG),Facial coverings (OxBSG),Stringency Index (OxBSG),Containment and Health Index (OxBSG)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, split it into separate lines, remove the commas, and add quotes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;"Country"
"Year"
"School closures (OxBSG)"
"Workplace Closures (OxBSG)"
"Cancel public events (OxBSG)"
"Restrictions on gatherings (OxBSG)"
"Close public transport (OxBSG)"
"Stay at home requirements (OxBSG)"
"Restrictions on internal movement (OxBSG)"
"International travel controls (OxBSG)"
"Income support (OxBSG)"
"Debt/contract relief (OxBSG)"
"Fiscal measures (OxBSG)"
"International support (OxBSG)"
"Public information campaigns (OxBSG)"
"Testing policy (OxBSG)"
"Contact tracing (OxBSG)"
"Emergency investment in health care (OxBSG)"
"Investment in Vaccines (OxBSG)"
"Facial coverings (OxBSG)"
"Stringency Index (OxBSG)"
"Containment and Health Index (OxBSG)"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;We now have most of a nice LABEL statement; let's find some nice valid SAS names, and make the statement complete:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;label
  country = "Country"
  year    = "Year"
  sch_cl  = "School closures (OxBSG)"
  wpc_cl  = "Workplace Closures (OxBSG)"
  can_pe  = "Cancel public events (OxBSG)"
  rst_ga  = "Restrictions on gatherings (OxBSG)"
  cl_pt   = "Close public transport (OxBSG)"
  sh_req  = "Stay at home requirements (OxBSG)"
  rst_im  = "Restrictions on internal movement (OxBSG)"
  int_tc  = "International travel controls (OxBSG)"
  inc_sp  = "Income support (OxBSG)"
  dc_rel  = "Debt/contract relief (OxBSG)"
  fis_me  = "Fiscal measures (OxBSG)"
  int_sp  = "International support (OxBSG)"
  pbc_ca  = "Public information campaigns (OxBSG)"
  tes_po  = "Testing policy (OxBSG)"
  con_tr  = "Contact tracing (OxBSG)"
  emg_in  = "Emergency investment in health care (OxBSG)"
  inv_vc  = "Investment in Vaccines (OxBSG)"
  fac_cv  = "Facial coverings (OxBSG)"
  str_in  = "Stringency Index (OxBSG)"
  ch_ind  = "Containment and Health Index (OxBSG)"
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;We now can hold down the alt key, mark only the names, and copy that to an input statement, where we add a character informat for country:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input
  country :$50.
  year   
  sch_cl 
  wpc_cl 
  can_pe 
  rst_ga 
  cl_pt  
  sh_req 
  rst_im 
  int_tc 
  inc_sp 
  dc_rel 
  fis_me 
  int_sp 
  pbc_ca 
  tes_po 
  con_tr 
  emg_in 
  inv_vc 
  fac_cv 
  str_in 
  ch_ind 
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now combine that with what we already have, and modify the INFILE statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename in url 'https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv';

data test;
infile in dlm=',' dsd firstobs=2 truncover;
label
  country = "Country"
  year    = "Year"
  sch_cl  = "School closures (OxBSG)"
  wpc_cl  = "Workplace Closures (OxBSG)"
  can_pe  = "Cancel public events (OxBSG)"
  rst_ga  = "Restrictions on gatherings (OxBSG)"
  cl_pt   = "Close public transport (OxBSG)"
  sh_req  = "Stay at home requirements (OxBSG)"
  rst_im  = "Restrictions on internal movement (OxBSG)"
  int_tc  = "International travel controls (OxBSG)"
  inc_sp  = "Income support (OxBSG)"
  dc_rel  = "Debt/contract relief (OxBSG)"
  fis_me  = "Fiscal measures (OxBSG)"
  int_sp  = "International support (OxBSG)"
  pbc_ca  = "Public information campaigns (OxBSG)"
  tes_po  = "Testing policy (OxBSG)"
  con_tr  = "Contact tracing (OxBSG)"
  emg_in  = "Emergency investment in health care (OxBSG)"
  inv_vc  = "Investment in Vaccines (OxBSG)"
  fac_cv  = "Facial coverings (OxBSG)"
  str_in  = "Stringency Index (OxBSG)"
  ch_ind  = "Containment and Health Index (OxBSG)"
;
input
  country :$50.
  year   
  sch_cl 
  wpc_cl 
  can_pe 
  rst_ga 
  cl_pt  
  sh_req 
  rst_im 
  int_tc 
  inc_sp 
  dc_rel 
  fis_me 
  int_sp 
  pbc_ca 
  tes_po 
  con_tr 
  emg_in 
  inv_vc 
  fac_cv 
  str_in 
  ch_ind 
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Voila, this is the log (run on my University Edition):&lt;/P&gt;
&lt;PRE&gt; 123          ch_ind
 124        ;
 125        run;
 
 NOTE: The infile IN is:
       Filename=https://github.com/owid/covid-19-data/raw/master/public/data/bsg/COVID%20Government%20Response%20(OxBSG).csv,
       Local Host Name=localhost.localdomain,
       Local Host IP addr=::1,
       Service Hostname Name=raw.githubusercontent.com,
       Service IP addr=199.232.16.133,
       Service Name=N/A,Service Portno=443,
       Lrecl=32767,Recfm=Variable
 
 NOTE: 57596 records were read from the infile IN.
       The minimum record length was 28.
       The maximum record length was 134.
 NOTE: The data set WORK.TEST has 57596 observations and 22 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           34.33 seconds
       cpu time            1.33 seconds
&lt;/PRE&gt;
&lt;P&gt;and the file imported fine.&lt;/P&gt;
&lt;P&gt;As you can see, it took me about a quarter of an hour from reading your post to do this. That's why I never use IMPORT on a CSV file.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 13:09:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-one-upload-github-database-directly-onto-SAS-or-do-I-need-to/m-p/696180#M212602</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-03T13:09:47Z</dc:date>
    </item>
  </channel>
</rss>

