<?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 can I import ASCII files (from FAERS database, FDA database) into SAS UE? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629928#M186420</link>
    <description>&lt;P&gt;I am trying to use the code you provided but when i hit the run, it show me blank tables for the variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have changed "&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; demo19q1&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token statement"&gt;infile&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'$HOME/sascommunity/DEMO19Q1.txt'&lt;/SPAN&gt; dlm&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'$'&lt;/SPAN&gt; dsd truncover firstobs&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;2&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;to where my files are stored.&amp;nbsp;&lt;/P&gt;&lt;P&gt;infile '$myfolders/sasuser.v94/DEMO19Q4.txt' ....&lt;/P&gt;&lt;P&gt;but when i run it, it is only a bank table for the defined variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am i doing something wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Mar 2020 19:31:56 GMT</pubDate>
    <dc:creator>RobCo</dc:creator>
    <dc:date>2020-03-05T19:31:56Z</dc:date>
    <item>
      <title>How can I import ASCII files (from FAERS database, FDA database) into SAS UE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629022#M185955</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am student and trying to do a project using FDA database called FAERS, the files are in ASCII formats. How can I import these files to SAS UE and then import the data into excel?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your help!&lt;/P&gt;&lt;P&gt;Please see the example in the link below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://fis.fda.gov/extensions/FPD-QDE-FAERS/FPD-QDE-FAERS.html" target="_blank"&gt;https://fis.fda.gov/extensions/FPD-QDE-FAERS/FPD-QDE-FAERS.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 05:07:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629022#M185955</guid>
      <dc:creator>RobCo</dc:creator>
      <dc:date>2020-03-03T05:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I import ASCII files (from FAERS database, FDA database) into SAS UE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629034#M185961</link>
      <description>&lt;P&gt;See example code for one of the files:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data demo19q1;
infile '$HOME/sascommunity/DEMO19Q1.txt' dlm='$' dsd truncover firstobs=2;
input
  primaryid :$10.
  caseid :$8.
  caseversion
  i_f_code :$1.
  _event_dt :$8.
  @
;
if length (_event_dt) = 4
then do;
  if _event_dt &amp;gt; "19"
  then event_dt = mdy(1,1,input(_event_dt,4.));
  else event_dt = mdy(input(substr(_event_dt,1,2),2.),1,2000+input(substr(_event_dt,3,2),2.));
end;
else if length(_event_dt) = 6
then event_dt = input(cats(_event_dt,'01'),yymmdd8.);
else event_dt = input(_event_dt,yymmdd8.);
input
  mfr_dt :yymmdd8.
  init_fda_dt :yymmdd8.
  fda_dt :yymmdd8.
  rept_cod :$3.
  auth_num :$40.
  mfr_num :$30.
  mfr_sndr :$20.
  lit_ref :$500.
  age
  age_cod :$3.
  age_grp :$1.
  sex :$3.
  e_sub :$1.
  wt
  wt_cod :$3.
  _rept_dt :$8.
  @
;
if length (_rept_dt) = 4
then do;
  if _rept_dt &amp;gt; "19"
  then rept_dt = mdy(1,1,input(_rept_dt,4.));
  else rept_dt = mdy(input(substr(_rept_dt,1,2),2.),1,2000+input(substr(_rept_dt,3,2),2.));
end;
else if length(_rept_dt) = 6
then rept_dt = input(cats(_rept_dt,'01'),yymmdd8.);
else rept_dt = input(_rept_dt,yymmdd8.);
input
  to_mfr :$1.
  occp_cod :$2.
  reporter_country :$2.
  occr_country :$2.
;
format
  event_dt
  mfr_dt
  init_fda_dt
  fda_dt
  rept_dt
    e8601da10.
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As you can see I had to do quite some cleaning on two of the date columns where all kinds of garbage has been entered. As it is, it still throws two NOTEs, one for a event_dt of "1683" (didn't know that the FDA already worked when the Ottomans besieged Vienna), and the other for a event_dt of "10190205" (now that's history).&lt;/P&gt;
&lt;P&gt;You will probably have to do similar cleaning for the other files.&lt;/P&gt;
&lt;P&gt;A description of the files is included in the&amp;nbsp;ASC_NTS.pdf file in the zip.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 07:18:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629034#M185961</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-03T07:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I import ASCII files (from FAERS database, FDA database) into SAS UE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629182#M186031</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see I had to do quite some cleaning on two of the date columns where all kinds of garbage has been entered. As it is, it still throws two NOTEs, one for a event_dt of "1683" (didn't know that the FDA already worked when the Ottomans besieged Vienna), and the other for a event_dt of "10190205" (now that's history).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Government agencies can be quite astounding in providing services. I have medical testing data where the tests are performed up to 20 years before the subject is born. (date of test and DOB reversed on data entry obviously).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And there are a few folks that are scheduled to start services in another government program in 12 years. Which means someone knows that family will have a child under age 5 at that time … .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of the things I like about SAS is relative ease of checking likely erroneous or extremely suspect date values.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 16:36:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629182#M186031</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-03T16:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I import ASCII files (from FAERS database, FDA database) into SAS UE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629713#M186287</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;Thank you so much for your response!&lt;/P&gt;&lt;P&gt;Do you know how i can combine these files? because there are files for drugs name, outcomes and etc&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 06:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629713#M186287</guid>
      <dc:creator>RobCo</dc:creator>
      <dc:date>2020-03-05T06:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I import ASCII files (from FAERS database, FDA database) into SAS UE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629722#M186295</link>
      <description>&lt;P&gt;You need to look for common variables that can be used as keys in joins, or for lookups with formats or hash objects.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 07:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629722#M186295</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-05T07:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I import ASCII files (from FAERS database, FDA database) into SAS UE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629928#M186420</link>
      <description>&lt;P&gt;I am trying to use the code you provided but when i hit the run, it show me blank tables for the variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have changed "&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; demo19q1&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token statement"&gt;infile&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'$HOME/sascommunity/DEMO19Q1.txt'&lt;/SPAN&gt; dlm&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'$'&lt;/SPAN&gt; dsd truncover firstobs&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;2&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;to where my files are stored.&amp;nbsp;&lt;/P&gt;&lt;P&gt;infile '$myfolders/sasuser.v94/DEMO19Q4.txt' ....&lt;/P&gt;&lt;P&gt;but when i run it, it is only a bank table for the defined variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am i doing something wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 19:31:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629928#M186420</guid>
      <dc:creator>RobCo</dc:creator>
      <dc:date>2020-03-05T19:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I import ASCII files (from FAERS database, FDA database) into SAS UE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629935#M186425</link>
      <description>&lt;P&gt;What does the log say? Please post it, using the {i} button.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 20:02:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629935#M186425</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-05T20:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I import ASCII files (from FAERS database, FDA database) into SAS UE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629948#M186436</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;&amp;nbsp;when the Ottomans besieged Vienna&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;+1 for the historical reference. We don't have enough of these. Have a croissant on me!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 20:39:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629948#M186436</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-03-05T20:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I import ASCII files (from FAERS database, FDA database) into SAS UE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629954#M186439</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;&amp;nbsp;when the Ottomans besieged Vienna&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;+1 for the historical reference. We don't have enough of these. Have a croissant on me!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well, kids in Vienna (and I was one) learn that year in Grammar School. Along with 1529.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 20:58:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629954#M186439</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-05T20:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I import ASCII files (from FAERS database, FDA database) into SAS UE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629963#M186442</link>
      <description>&lt;P&gt;I just could run it successfully with the code you provided! Thanks a lot!! I had to delete the $, so SAS can find the file.&lt;/P&gt;&lt;P&gt;Can I use the same code for other files or do i need to revise the code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, i do not know anything about programming or coding!&lt;/P&gt;&lt;P&gt;Could you please help me to import the other files too?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 22:01:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/629963#M186442</guid>
      <dc:creator>RobCo</dc:creator>
      <dc:date>2020-03-05T22:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I import ASCII files (from FAERS database, FDA database) into SAS UE?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/630010#M186457</link>
      <description>&lt;P&gt;You can use the basic structure, but you need to adapt it to the individual file in question. The documentation provided in the first pdf of the archive provides information about the columns.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 07:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/630010#M186457</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-06T07:08:56Z</dc:date>
    </item>
    <item>
      <title>How can I import ASCII files (from FAERS database, FDA database) into SAS ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/637732#M189598</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you for your help, you really help me alot. Would you please provide the SAS codes to import the FDA FAERS ASCII 2019 files (all files), if you have them. I appreciate your help.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2020 20:43:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/637732#M189598</guid>
      <dc:creator>Thomas11</dc:creator>
      <dc:date>2020-04-05T20:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I import ASCII files (from FAERS database, FDA database) into SAS ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/637999#M189708</link>
      <description>&lt;P&gt;You can find examples for reading those files in this thread. If your code did not work as expected, show us your code (including the log, if you have ERRORs, WARNINGs or NOTEs you do not understand), and tell us where the results did not meet your expectations.&lt;/P&gt;
&lt;P&gt;Use the "little running man" for posting code, and &amp;lt;/&amp;gt; for posting logs.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2020 07:45:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-import-ASCII-files-from-FAERS-database-FDA-database/m-p/637999#M189708</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-07T07:45:18Z</dc:date>
    </item>
  </channel>
</rss>

