<?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 What procedure to use to populate data in dataset? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/What-procedure-to-use-to-populate-data-in-dataset/m-p/23351#M5146</link>
    <description>HI,&lt;BR /&gt;
&lt;BR /&gt;
I have a SAS shell dataset with a column listing ‘Outcomes’ and a ‘Total # of Outcomes’ column next to it.  To produce a daily report, I need to populate the Total column based on another SAS dataset that will be updated daily. How do I go about doing this? What procedure would I use to do this?  Proc tabulate?</description>
    <pubDate>Fri, 24 Apr 2009 15:38:21 GMT</pubDate>
    <dc:creator>MKSAS</dc:creator>
    <dc:date>2009-04-24T15:38:21Z</dc:date>
    <item>
      <title>What procedure to use to populate data in dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-procedure-to-use-to-populate-data-in-dataset/m-p/23351#M5146</link>
      <description>HI,&lt;BR /&gt;
&lt;BR /&gt;
I have a SAS shell dataset with a column listing ‘Outcomes’ and a ‘Total # of Outcomes’ column next to it.  To produce a daily report, I need to populate the Total column based on another SAS dataset that will be updated daily. How do I go about doing this? What procedure would I use to do this?  Proc tabulate?</description>
      <pubDate>Fri, 24 Apr 2009 15:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-procedure-to-use-to-populate-data-in-dataset/m-p/23351#M5146</guid>
      <dc:creator>MKSAS</dc:creator>
      <dc:date>2009-04-24T15:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: What procedure to use to populate data in dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-procedure-to-use-to-populate-data-in-dataset/m-p/23352#M5147</link>
      <description>Hi &lt;B&gt;MKSAS&lt;/B&gt;,&lt;BR /&gt;
&lt;BR /&gt;
Here is an example that shows how you may "connect" two data sets:&lt;BR /&gt;
&lt;BR /&gt;
data daily;&lt;BR /&gt;
input ID $ Total_daily;&lt;BR /&gt;
datalines;&lt;BR /&gt;
01 9283778479&lt;BR /&gt;
02 39850367&lt;BR /&gt;
03 3587396&lt;BR /&gt;
04 359839679&lt;BR /&gt;
05 369839687&lt;BR /&gt;
06 386739687&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
data shell;&lt;BR /&gt;
input ID $;&lt;BR /&gt;
datalines;&lt;BR /&gt;
01 &lt;BR /&gt;
02 &lt;BR /&gt;
03 &lt;BR /&gt;
04 &lt;BR /&gt;
05 &lt;BR /&gt;
06 &lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=daily; by ID;&lt;BR /&gt;
proc sort data=shell; by ID;&lt;BR /&gt;
&lt;BR /&gt;
data shell(keep=ID  Total); &lt;BR /&gt;
merge shell daily(keep=ID Total_daily); by ID;&lt;BR /&gt;
rename Total_daily=Total;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=shell noobs;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 24 Apr 2009 16:43:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-procedure-to-use-to-populate-data-in-dataset/m-p/23352#M5147</guid>
      <dc:creator>statsplank</dc:creator>
      <dc:date>2009-04-24T16:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: What procedure to use to populate data in dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-procedure-to-use-to-populate-data-in-dataset/m-p/23353#M5148</link>
      <description>There are several techniques, some of which may be (depending on your input SAS dataset):&lt;BR /&gt;
&lt;BR /&gt;
1) SAS PROC SQL to read your "another SAS dataset", summarize to daily totals and generate report.&lt;BR /&gt;
2) SAS DATA step to read your "another SAS dataset", translate those SAS variables/columns to conform with your "SAS shell dataset", summarize to a "daily" totals SAS temporary file, and then generate a report, possibly using either PROC PRINT, PROC REPORT, DATA step?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
It's undetermined if you intend to maintain some "running daily totals" from your stated "SAS shell datasets" or if you are in a position to use SAS code to re-read the daily files and create some weekly/month "totals" perspective in report-format.&lt;BR /&gt;
&lt;BR /&gt;
Questions to ask are how/where is the SAS-generated output/report information to be hosted, in what format, and how will historical report versions to be maintained?&lt;BR /&gt;
This information is just the start to developing a SAS-based application, given what you have explained thus far - a good start though.&lt;BR /&gt;
&lt;BR /&gt;
The SAS support   &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website has much information such as technical/conference papers and SAS-hosted documentation for reference and use.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS 9.2 DOC: Reading, Combining, and Modifying SAS Data Sets&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a001125856.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a001125856.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
SAS 9.2 Documentation - referenced by topic category:&lt;BR /&gt;
&lt;A href="http://support.sas.com/cdlsearch?ct=80000" target="_blank"&gt;http://support.sas.com/cdlsearch?ct=80000&lt;/A&gt;</description>
      <pubDate>Fri, 24 Apr 2009 16:53:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-procedure-to-use-to-populate-data-in-dataset/m-p/23353#M5148</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-04-24T16:53:25Z</dc:date>
    </item>
  </channel>
</rss>

