<?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 Keep Values of Variable FAERS Database in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Keep-Values-of-Variable-FAERS-Database/m-p/843261#M36586</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using FAERS database for my project. I am trying to select only one drug from the variable "drugname". I used where and if statments but I get error all the time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;libname kete'c:\users\alamrikd\Desktop';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data kete.drug12q4;&lt;BR /&gt;infile 'c:\users\alamrikd\Desktop\DRUG13Q1.txt' dlm='$' dsd truncover firstobs=2;&lt;BR /&gt;input&lt;BR /&gt;primaryid :$10.&lt;BR /&gt;caseid :$8.&lt;BR /&gt;drug_seq&lt;BR /&gt;role_cod :$2.&lt;BR /&gt;drugname :$30.&lt;BR /&gt;prod_ai :$50.&lt;BR /&gt;val_vbm :$1.&lt;BR /&gt;route :$10.&lt;BR /&gt;dose_vbm :$30.&lt;BR /&gt;cum_dose_chr&lt;BR /&gt;cum_dose_unit :$7.&lt;BR /&gt;dechal :$1.&lt;BR /&gt;rechal :$1.&lt;BR /&gt;lot_num :$20.&lt;BR /&gt;_exp_dt :$10.&lt;BR /&gt;@&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc contents data = kete.drug12q4;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=kete.drug12q4(obs=3);&lt;BR /&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data kete.metformin;&lt;BR /&gt;set kete.drug12q4;&lt;BR /&gt;where drugname = 'metformin';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want select only observations for metformin, could you help me how to subset the data based on that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Wed, 09 Nov 2022 00:02:55 GMT</pubDate>
    <dc:creator>alamrikd</dc:creator>
    <dc:date>2022-11-09T00:02:55Z</dc:date>
    <item>
      <title>Keep Values of Variable FAERS Database</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Keep-Values-of-Variable-FAERS-Database/m-p/843261#M36586</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using FAERS database for my project. I am trying to select only one drug from the variable "drugname". I used where and if statments but I get error all the time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;libname kete'c:\users\alamrikd\Desktop';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data kete.drug12q4;&lt;BR /&gt;infile 'c:\users\alamrikd\Desktop\DRUG13Q1.txt' dlm='$' dsd truncover firstobs=2;&lt;BR /&gt;input&lt;BR /&gt;primaryid :$10.&lt;BR /&gt;caseid :$8.&lt;BR /&gt;drug_seq&lt;BR /&gt;role_cod :$2.&lt;BR /&gt;drugname :$30.&lt;BR /&gt;prod_ai :$50.&lt;BR /&gt;val_vbm :$1.&lt;BR /&gt;route :$10.&lt;BR /&gt;dose_vbm :$30.&lt;BR /&gt;cum_dose_chr&lt;BR /&gt;cum_dose_unit :$7.&lt;BR /&gt;dechal :$1.&lt;BR /&gt;rechal :$1.&lt;BR /&gt;lot_num :$20.&lt;BR /&gt;_exp_dt :$10.&lt;BR /&gt;@&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc contents data = kete.drug12q4;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=kete.drug12q4(obs=3);&lt;BR /&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data kete.metformin;&lt;BR /&gt;set kete.drug12q4;&lt;BR /&gt;where drugname = 'metformin';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want select only observations for metformin, could you help me how to subset the data based on that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 00:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Keep-Values-of-Variable-FAERS-Database/m-p/843261#M36586</guid>
      <dc:creator>alamrikd</dc:creator>
      <dc:date>2022-11-09T00:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Keep Values of Variable FAERS Database</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Keep-Values-of-Variable-FAERS-Database/m-p/843294#M36588</link>
      <description>&lt;P&gt;Please post the log of all the steps using "insert code" button.&lt;/P&gt;
&lt;P&gt;Are you sure that the value is written in all lowercase?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 07:35:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Keep-Values-of-Variable-FAERS-Database/m-p/843294#M36588</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-11-09T07:35:48Z</dc:date>
    </item>
  </channel>
</rss>

