<?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: PROC PRINT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453057#M114416</link>
    <description>I cannot use a data step. Just like gender which has two values, I am identifying the county there. I do not have the values done those counties. So it's not possible.</description>
    <pubDate>Wed, 11 Apr 2018 03:58:49 GMT</pubDate>
    <dc:creator>raajdesaii</dc:creator>
    <dc:date>2018-04-11T03:58:49Z</dc:date>
    <item>
      <title>PROC PRINT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453032#M114396</link>
      <description>&lt;P&gt;Hello, I wanted to know if there is a way to output data to a SAS dataset in the PROC PRINT step. I want to create new dataset with the values I get in the PROC PRINT step and I could not think of any other alternative than this. Thanks, any help will be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 02:44:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453032#M114396</guid>
      <dc:creator>raajdesaii</dc:creator>
      <dc:date>2018-04-11T02:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453039#M114402</link>
      <description>&lt;P&gt;Show an example of what you're trying to do (including example data in the form of a datastep, and the specific proc print you're running.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 03:01:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453039#M114402</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-04-11T03:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453040#M114403</link>
      <description>&lt;P&gt;proc freq data=counties;&lt;BR /&gt;tables F0410180;&lt;BR /&gt;where diabetes=1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is my proc print step. I want this output in the form of a SAS dataset. I am not sure what could be another way the same thing could be done. But as you can see the variable F0410180, I have another 8 variables similar to that which identifies the counties where diabetes=1. So I want to merge all those datasets after I have all the counties where diabetes=1.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 03:05:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453040#M114403</guid>
      <dc:creator>raajdesaii</dc:creator>
      <dc:date>2018-04-11T03:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453045#M114407</link>
      <description>&lt;P&gt;That's a proc freq, not a proc print.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With proc freq you can get the same info output by using the out option. e.g.:&lt;/P&gt;
&lt;PRE&gt;proc freq data=sashelp.class;
  tables age/ out=want;
  where sex='M';
run;&lt;/PRE&gt;
&lt;P&gt;Conversely, if you want everything, you can use ODS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 03:26:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453045#M114407</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-04-11T03:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453046#M114408</link>
      <description>&lt;P&gt;I am really sorry.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc print data=sashelp.class;
  tables age/ out=want;
  where sex='M';
run;&lt;/PRE&gt;&lt;P&gt;I typed proc freq because I was trying some alternatives. I know how to get it using proc frequencies. I want to use proc print and get everything. Sometimes, it is really hard to explain what I am trying to do.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 03:29:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453046#M114408</guid>
      <dc:creator>raajdesaii</dc:creator>
      <dc:date>2018-04-11T03:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453047#M114409</link>
      <description>&lt;P&gt;That proc print won't run as there is no TABLES option in proc print. Show a valid working example of what your trying to explain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.con&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 03:32:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453047#M114409</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-04-11T03:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453052#M114412</link>
      <description>proc print data=counties;&lt;BR /&gt;Var F0410180;&lt;BR /&gt;where diabetes=1;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;Okay, that is the code. So I already have a county identified for eg. Queens. F0410180, F0410280, F0410380, .... F04111380 are the variables which has the contiguous county next to the county I have already identified. And I want that county to follow the condition, where diabetes=1.&lt;BR /&gt;&lt;BR /&gt;Now, I was thinking if I could create a SAS dataset using a Proc print which allows me to see all the counties which follows that condition. Please let me know if there is an alternative method by which I could identify those counties and merge them together along with all the other variables in the dataset.</description>
      <pubDate>Wed, 11 Apr 2018 03:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453052#M114412</guid>
      <dc:creator>raajdesaii</dc:creator>
      <dc:date>2018-04-11T03:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453055#M114414</link>
      <description>&lt;P&gt;Why proc print? Just use a datastep:&lt;/P&gt;
&lt;PRE&gt;data want (keep=name);
  set sashelp.class;
  where sex eq 'M';
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 03:56:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453055#M114414</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-04-11T03:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453057#M114416</link>
      <description>I cannot use a data step. Just like gender which has two values, I am identifying the county there. I do not have the values done those counties. So it's not possible.</description>
      <pubDate>Wed, 11 Apr 2018 03:58:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453057#M114416</guid>
      <dc:creator>raajdesaii</dc:creator>
      <dc:date>2018-04-11T03:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453186#M114486</link>
      <description>&lt;P&gt;I don't see why you can't use a datastep. Your current code:&lt;/P&gt;
&lt;PRE&gt;proc print data=counties;
Var F0410180;
where diabetes=1;
run;
&lt;/PRE&gt;
&lt;P&gt;would print the same data as captured in the following datastep:&lt;/P&gt;
&lt;PRE&gt;data want (keep=F0410180);
  set counties;
  where diabetes eq 1;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 13:05:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453186#M114486</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-04-11T13:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453250#M114506</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/196010"&gt;@raajdesaii&lt;/a&gt; wrote:&lt;BR /&gt;I cannot use a data step. Just like gender which has two values, I am identifying the county there. I do not have the values done those counties. So it's not possible.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Explain in very detailed language why it is not possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The WHERE statement in Proc print works pretty much exactly the same as WHERE statement in a data step. So anything you can select for proc print can be selected in a data step with the exact same where statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the hang up is that the data set might have more variables than you want then KEEP only the variable you want in the data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 14:52:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PRINT/m-p/453250#M114506</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-11T14:52:24Z</dc:date>
    </item>
  </channel>
</rss>

