<?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: How to output a macro result to a specified .lst file? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806662#M33578</link>
    <description>&lt;P&gt;ODS PDF should work and would allow way more appearance controls. I expect you can create ODS RTF files though I don't know if you would have a program to display them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/253026"&gt;@cosmid&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I didn't know any other output file format from SAS that might work in UNIX so I picked .lst. The method worked! Thank you so much for your help!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 21:26:06 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-04-07T21:26:06Z</dc:date>
    <item>
      <title>How to output a macro result to a specified .lst file?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806651#M33575</link>
      <description>&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I have a program with two macros that print out month report and the other for quarter report:&lt;/P&gt;&lt;P&gt;%macro printmonth(mon);&lt;/P&gt;&lt;P&gt;&amp;nbsp; print statements here;&lt;/P&gt;&lt;P&gt;%mend printmonth;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro printqtr(qtr);&lt;/P&gt;&lt;P&gt;&amp;nbsp; print statements here;&lt;/P&gt;&lt;P&gt;%mend printqtr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%printmonth(Jan);&lt;/P&gt;&lt;P&gt;%printmonth(Feb);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%printqtr(qtr1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I create two different .lst files and name them as monthly.lst and quarter.lst? Currently, this program will create a single .lst file with the same name as the program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 20:14:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806651#M33575</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2022-04-07T20:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to output a macro result to a specified .lst file?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806652#M33576</link>
      <description>&lt;P&gt;&amp;nbsp;Something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods listing file="&amp;lt;path goes her&amp;gt;/filename";
%printmonth(Jan);
%printmonth(Feb);
ods listing close;

ods listing file="&amp;lt;path&amp;gt;/othername";
%printqtr(qtr1);
ods listing close;

 &lt;/PRE&gt;
&lt;P&gt;Though I have a hard time understanding why anyone actually wants Listing output any more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/253026"&gt;@cosmid&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;For example,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I have a program with two macros that print out month report and the other for quarter report:&lt;/P&gt;
&lt;P&gt;%macro printmonth(mon);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; print statements here;&lt;/P&gt;
&lt;P&gt;%mend printmonth;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro printqtr(qtr);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; print statements here;&lt;/P&gt;
&lt;P&gt;%mend printqtr;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%printmonth(Jan);&lt;/P&gt;
&lt;P&gt;%printmonth(Feb);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%printqtr(qtr1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I create two different .lst files and name them as monthly.lst and quarter.lst? Currently, this program will create a single .lst file with the same name as the program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 20:33:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806652#M33576</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-07T20:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to output a macro result to a specified .lst file?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806658#M33577</link>
      <description>&lt;P&gt;I didn't know any other output file format from SAS that might work in UNIX so I picked .lst. The method worked! Thank you so much for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 21:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806658#M33577</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2022-04-07T21:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to output a macro result to a specified .lst file?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806662#M33578</link>
      <description>&lt;P&gt;ODS PDF should work and would allow way more appearance controls. I expect you can create ODS RTF files though I don't know if you would have a program to display them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/253026"&gt;@cosmid&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I didn't know any other output file format from SAS that might work in UNIX so I picked .lst. The method worked! Thank you so much for your help!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 21:26:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806662#M33578</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-07T21:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to output a macro result to a specified .lst file?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806684#M33579</link>
      <description>I have never tried either of them in UNIX environment. Once I have a chance I will give both a try and update you. Thanks again for showing me how to use the ods file statement. I learned about it before but didn't know I can use it straight up on a macro.</description>
      <pubDate>Fri, 08 Apr 2022 02:21:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806684#M33579</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2022-04-08T02:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to output a macro result to a specified .lst file?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806690#M33580</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/253026"&gt;@cosmid&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I have never tried either of them in UNIX environment. Once I have a chance I will give both a try and update you. Thanks again for showing me how to use the ods file statement. I learned about it before but didn't know I can use it straight up on a macro.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The macro processor is just a tool to allow you to generate SAS code.&amp;nbsp; So you can use it to generate any valid SAS code that you want to generate.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 04:00:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806690#M33580</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-04-08T04:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to output a macro result to a specified .lst file?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806814#M33584</link>
      <description>&lt;P&gt;I have tried with RTF and PDF in the UNIX environment and it didn't work. It creates a file ending in .rtf and .pdf but once opened, they are just gibberish. Maybe I need to contact system admin for add-ons to open RTF or PDF files in UNIX? However, they both worked in SAS Windows. For me, the lst is sufficent and gets the job done.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again, now I learned how to create RTF and PDF in SAS Windows. I'm sure this will come in handy when I need it.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 17:00:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-output-a-macro-result-to-a-specified-lst-file/m-p/806814#M33584</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2022-04-08T17:00:07Z</dc:date>
    </item>
  </channel>
</rss>

