<?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: Need to convert Stata codes into SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-Stata-codes-into-SAS/m-p/680816#M205848</link>
    <description>data part1; set have; trade_leg=0; run;&lt;BR /&gt;data part2; set have; trade_leg=1; run;&lt;BR /&gt;data whole; set part1 part2;&lt;BR /&gt;if trade_leg=0 then broker = catx("buy_",broker);&lt;BR /&gt;else if trade_leg=1 then broker = catx("sell_", broker);&lt;BR /&gt;drop buy: sel:;  run;</description>
    <pubDate>Tue, 01 Sep 2020 20:45:08 GMT</pubDate>
    <dc:creator>pink_poodle</dc:creator>
    <dc:date>2020-09-01T20:45:08Z</dc:date>
    <item>
      <title>Need to convert Stata codes into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-Stata-codes-into-SAS/m-p/680734#M205799</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please help me convert this Stata codes into SAS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;expand 2, gen(trade_leg)&lt;BR /&gt;foreach v in broker {&lt;BR /&gt;gen `v'= buy_`v' if trade_leg==0&lt;BR /&gt;replace `v' = sell_`v' if trade_leg==1&lt;BR /&gt;drop buy_`v' sell_`v'&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help. Cheers!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 16:00:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-Stata-codes-into-SAS/m-p/680734#M205799</guid>
      <dc:creator>bd_user_10</dc:creator>
      <dc:date>2020-09-01T16:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need to convert Stata codes into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-Stata-codes-into-SAS/m-p/680816#M205848</link>
      <description>data part1; set have; trade_leg=0; run;&lt;BR /&gt;data part2; set have; trade_leg=1; run;&lt;BR /&gt;data whole; set part1 part2;&lt;BR /&gt;if trade_leg=0 then broker = catx("buy_",broker);&lt;BR /&gt;else if trade_leg=1 then broker = catx("sell_", broker);&lt;BR /&gt;drop buy: sel:;  run;</description>
      <pubDate>Tue, 01 Sep 2020 20:45:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-convert-Stata-codes-into-SAS/m-p/680816#M205848</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2020-09-01T20:45:08Z</dc:date>
    </item>
  </channel>
</rss>

