<?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 Creating specific output using two datasets in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-specific-output-using-two-datasets-in-sas/m-p/23506#M3899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a two data set named dataset1 and dataset2 and want to create output like the one in attached excel workbook Test sheet name output &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both the dataset are in same format as in excel sheet attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone help me with SAS code or macro to create dataset as the one in output sheet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the variable except central are created using dataset1 and counting region for example &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table NEW AS &lt;BR /&gt;SELECT region,COUNT(region)AS _61OMP from perf.input&lt;BR /&gt;WHERE region="Kundelinjen (Ledelse &amp;amp; stab)" &lt;BR /&gt;and fejltype="3829 RD BACO" and fejltekst="Sag sendt for sent ind"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GROUP BY REGION, fejltype,fejltekst&amp;nbsp; ;&lt;BR /&gt;QUit;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;output files has all the conditions in form of excel formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&amp;nbsp; Central variable is created using sum function and dataset2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/STRONG&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jan 2012 07:10:14 GMT</pubDate>
    <dc:creator>Siddhartha</dc:creator>
    <dc:date>2012-01-04T07:10:14Z</dc:date>
    <item>
      <title>Creating specific output using two datasets in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-specific-output-using-two-datasets-in-sas/m-p/23506#M3899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a two data set named dataset1 and dataset2 and want to create output like the one in attached excel workbook Test sheet name output &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both the dataset are in same format as in excel sheet attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone help me with SAS code or macro to create dataset as the one in output sheet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the variable except central are created using dataset1 and counting region for example &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table NEW AS &lt;BR /&gt;SELECT region,COUNT(region)AS _61OMP from perf.input&lt;BR /&gt;WHERE region="Kundelinjen (Ledelse &amp;amp; stab)" &lt;BR /&gt;and fejltype="3829 RD BACO" and fejltekst="Sag sendt for sent ind"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GROUP BY REGION, fejltype,fejltekst&amp;nbsp; ;&lt;BR /&gt;QUit;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;﻿&lt;/STRONG&gt;output files has all the conditions in form of excel formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&amp;nbsp; Central variable is created using sum function and dataset2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/STRONG&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 07:10:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-specific-output-using-two-datasets-in-sas/m-p/23506#M3899</guid>
      <dc:creator>Siddhartha</dc:creator>
      <dc:date>2012-01-04T07:10:14Z</dc:date>
    </item>
    <item>
      <title>Creating specific output using two datasets in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-specific-output-using-two-datasets-in-sas/m-p/23507#M3900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to provide more words to descibe what you want to happen.&lt;/P&gt;&lt;P&gt;It looks from a quick inspection that you want to use PROC FREQ or some other summary method to generate the counts in your "output" sheet.&amp;nbsp; &lt;/P&gt;&lt;P&gt;How do the two other sheets interact?&amp;nbsp; From quick inspection it looks like the first are the events to count and the second is perhaps the denominator counts by region?&amp;nbsp; If you need to link them how are the linked?&amp;nbsp; The first sheet seems to have region name and the second has what looks like a region id number.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 15:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-specific-output-using-two-datasets-in-sas/m-p/23507#M3900</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-01-04T15:20:09Z</dc:date>
    </item>
  </channel>
</rss>

