<?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 help with coding in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53767#M14876</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic!&amp;nbsp; Thank you both.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Nov 2011 16:28:56 GMT</pubDate>
    <dc:creator>wpgnbo</dc:creator>
    <dc:date>2011-11-25T16:28:56Z</dc:date>
    <item>
      <title>help with coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53762#M14871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to do the following, but I don't know how to code it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 5 character variables (med_1, med_2 ... med_5) and I want to create a new variable, "antibiotic", which will = 1 if ANY of med_1-med_5 contain the name of an antibiotic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to create a list of possible antibiotic names: ampicillin, amoxicillin, gentamycin, etc.&amp;nbsp; and then tell SAS to check the contents of med_1-med_5 and if ANY are equal to a drug name in my list, then make antibiotic=1, otherwise, antibiotic=0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 23:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53762#M14871</guid>
      <dc:creator>wpgnbo</dc:creator>
      <dc:date>2011-11-24T23:21:13Z</dc:date>
    </item>
    <item>
      <title>help with coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53763#M14872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a number of ways to do what you want.&amp;nbsp; One way would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat med1-med5 $20.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input med1-med5;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;this that something another placebo&lt;/P&gt;&lt;P&gt;this that amoxicillin another placebo&lt;/P&gt;&lt;P&gt;this that something another placebo&lt;/P&gt;&lt;P&gt;this that something another gentamycin&lt;/P&gt;&lt;P&gt;ampicillin amoxicillin gentamycin somethingelse that&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=i);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array meds(*) $20. med1-med5;&lt;/P&gt;&lt;P&gt;&amp;nbsp; antibiotic=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to dim(meds);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if meds(i) in ("ampicillin", "amoxicillin", "gentamycin")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then antibiotic=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 23:47:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53763#M14872</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-11-24T23:47:33Z</dc:date>
    </item>
    <item>
      <title>help with coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53764#M14873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much!&amp;nbsp; Is there a way to check for anything beginning with "amox"?&amp;nbsp; (so it would capture "amoxil", "amoxicillin", etc.?)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2011 00:04:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53764#M14873</guid>
      <dc:creator>wpgnbo</dc:creator>
      <dc:date>2011-11-25T00:04:22Z</dc:date>
    </item>
    <item>
      <title>help with coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53765#M14874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is probably a more efficient way of coding it, but the following should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat med1-med5 $20.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input med1-med5;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;this that something another placebo&lt;/P&gt;&lt;P&gt;this that amoxicillinplus another placebo&lt;/P&gt;&lt;P&gt;this that something another placebo&lt;/P&gt;&lt;P&gt;this that something another gentamycin&lt;/P&gt;&lt;P&gt;ampicillin amoxicillinextra gentamycinplus1 somethingelse that&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array meds(*) $20. med1-med5;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array drugs(3) $20. ("ampici", "amoxici", "gentamyci");&lt;/P&gt;&lt;P&gt;&amp;nbsp; antibiotic=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to dim(meds);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do j=1 to dim(drugs);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if strip(drugs(j)) =: meds(i) then antibiotic=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2011 00:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53765#M14874</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-11-25T00:57:36Z</dc:date>
    </item>
    <item>
      <title>help with coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53766#M14875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi .Art .&lt;/P&gt;&lt;P&gt;You can use colon operator like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if meds(i)&amp;nbsp; &lt;STRONG&gt; in:&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; ("amp", "amox", "gent")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2011 02:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53766#M14875</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-11-25T02:15:34Z</dc:date>
    </item>
    <item>
      <title>help with coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53767#M14876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic!&amp;nbsp; Thank you both.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2011 16:28:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-with-coding/m-p/53767#M14876</guid>
      <dc:creator>wpgnbo</dc:creator>
      <dc:date>2011-11-25T16:28:56Z</dc:date>
    </item>
  </channel>
</rss>

