<?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: first.variables in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146197#M11412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where is variable RESULT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without a variable RESULT in a BY statement there can be no FIRST.RESULT or LAST.RESULT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Jan 2015 16:12:49 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2015-01-30T16:12:49Z</dc:date>
    <item>
      <title>first.variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146196#M11411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My data is like:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="margin-left: 4.65pt; width: 241px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;Id &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;year&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;month&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;response&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;3&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;3&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;4&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;4&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="59"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;100131&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="80"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;2014&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="60"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="42"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'System','sans-serif';"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to count the number of 0 response and number of 1 response for each month. i have sorted the data by id year month and response.&lt;/P&gt;&lt;P&gt;the output must be the following:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 320px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;id&lt;/TD&gt;&lt;TD width="64"&gt;year&lt;/TD&gt;&lt;TD width="64"&gt;month&lt;/TD&gt;&lt;TD width="64"&gt;response&lt;/TD&gt;&lt;TD width="64"&gt;count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;100131&lt;/TD&gt;&lt;TD class="xl63"&gt;2014&lt;/TD&gt;&lt;TD class="xl63"&gt;3&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD class="xl63" height="20"&gt;100131&lt;/TD&gt;&lt;TD class="xl63"&gt;2014&lt;/TD&gt;&lt;TD class="xl63"&gt;3&lt;/TD&gt;&lt;TD class="xl64"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD class="xl63" height="20"&gt;100131&lt;/TD&gt;&lt;TD class="xl63"&gt;2014&lt;/TD&gt;&lt;TD class="xl63"&gt;4&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD class="xl63" height="20"&gt;100131&lt;/TD&gt;&lt;TD class="xl63"&gt;2014&lt;/TD&gt;&lt;TD class="xl63"&gt;5&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl63"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD class="xl63" height="20"&gt;100131&lt;/TD&gt;&lt;TD class="xl63"&gt;2014&lt;/TD&gt;&lt;TD class="xl63"&gt;5&lt;/TD&gt;&lt;TD class="xl63"&gt;1&lt;/TD&gt;&lt;TD class="xl63"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;the code i have used is :&lt;/P&gt;&lt;P&gt;data step......&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;if first.month and first.response then count=0;&lt;/P&gt;&lt;P&gt;count+1;&lt;/P&gt;&lt;P&gt;if last.response then output;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i am not getting the expected output..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me in fixing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 16:01:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146196#M11411</guid>
      <dc:creator>pkmkart</dc:creator>
      <dc:date>2015-01-30T16:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: first.variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146197#M11412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where is variable RESULT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without a variable RESULT in a BY statement there can be no FIRST.RESULT or LAST.RESULT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 16:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146197#M11412</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-01-30T16:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: first.variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146198#M11413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc freq data=have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tables id*year*month*response/ list nopercent nocum;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;if you want a dataset as well add OUT=newdatasetname after the / above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 16:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146198#M11413</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-01-30T16:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: first.variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146199#M11414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry it is the 'response' I have unknowingly written as result. may be&amp;nbsp; the code goes like this;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;if first.month and first.response then count=0;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;count+1;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;if last.response then output;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 16:27:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146199#M11414</guid>
      <dc:creator>pkmkart</dc:creator>
      <dc:date>2015-01-30T16:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: first.variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146200#M11415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got the same result in proc freq using similar code like urs. but I wanted to try in datastep if possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 16:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146200#M11415</guid>
      <dc:creator>pkmkart</dc:creator>
      <dc:date>2015-01-30T16:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: first.variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146201#M11416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Leave off FIRST.MONTH from the first IF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 16:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146201#M11416</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-01-30T16:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: first.variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146202#M11417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem with my data is that, not&amp;nbsp; all the id will have 0 and 1 some times the value is only 0 for all the month, so during that time the 0 will be counted despite the month change. but what I want is the response count for each month when it is 0 and 1.. so i cannot omit the first.month&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 16:44:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146202#M11417</guid>
      <dc:creator>pkmkart</dc:creator>
      <dc:date>2015-01-30T16:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: first.variables</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146203#M11418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; response;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; id year month response;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;cards&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffc0;"&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;3&lt;BR /&gt;0&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;3&lt;BR /&gt;1&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;4&lt;BR /&gt;0&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;4&lt;BR /&gt;0&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;5&lt;BR /&gt;0&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;5&lt;BR /&gt;0&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;5&lt;BR /&gt;0&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;5&lt;BR /&gt;0&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;5&lt;BR /&gt;0&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;5&lt;BR /&gt;0&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;5&lt;BR /&gt;1&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;5&lt;BR /&gt;1&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;5&lt;BR /&gt;1&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;5&lt;BR /&gt;1&lt;BR /&gt;100131&lt;BR /&gt;2014&lt;BR /&gt;5&lt;BR /&gt;1&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;;;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; counts;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; response;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; id month;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; c[&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;:&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;] &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;_temporary_&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; first.month &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;; c[&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;]=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;; c[&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;]=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; c[response]+&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; last.month &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;do&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; response=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count = c[response];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;output&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 17:11:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/first-variables/m-p/146203#M11418</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-01-30T17:11:15Z</dc:date>
    </item>
  </channel>
</rss>

