<?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 automatically add data set name on output title in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-automatically-add-data-set-name-on-output-title/m-p/576612#M23076</link>
    <description>The difference between your TITLE statement and the solution TITLE statement is that you used single quotes. &amp;amp;SYSLAST will NOT resolve when it is enclosed within single quotes. It needs to be resolved within double quotes.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
    <pubDate>Thu, 25 Jul 2019 14:31:06 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2019-07-25T14:31:06Z</dc:date>
    <item>
      <title>How to automatically add data set name on output title</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-automatically-add-data-set-name-on-output-title/m-p/576517#M23072</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I would like SAS 9.4 to put automatically the name of the data set I'm running on the title of SAS output/results viewer. How to do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an example of the code I'm running:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname Experiment 'O:\MAINFOLDER\SUBFOLDER\SAS library';&lt;BR /&gt;PROC IMPORT OUT= Experiment.measurements DATAFILE= "O:\MAINFOLDER\SUBFOLDER\filename.xlsx"&lt;BR /&gt;DBMS=XLSX REPLACE;&lt;BR /&gt;SHEET="SAS";&lt;BR /&gt;GETNAMES=YES;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC PRINT data=Experiment.measurements;&lt;BR /&gt;title 'Data set &lt;FONT color="#FF0000"&gt;&lt;U&gt;Experiment.measurements&lt;/U&gt;&lt;/FONT&gt; all observations';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So how do I make SAS automatically to change the title text marked with red to match the current data set I'm running? It's to time consuming to change all the titles manually when changing from one data set to another!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any help &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 09:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-automatically-add-data-set-name-on-output-title/m-p/576517#M23072</guid>
      <dc:creator>Robois</dc:creator>
      <dc:date>2019-07-25T09:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to automatically add data set name on output title</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-automatically-add-data-set-name-on-output-title/m-p/576524#M23073</link>
      <description>&lt;P&gt;Maybe i missed something, but aren't libref limited to 8 chars and datasets to 32 chars?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS saves the name of the last dataset created by datastep or proc in the macro-variable SYSLAST. So changing the title-statement to &lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title "Dataset &amp;amp;SYSLAST all obs";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;should solve the problem.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 10:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-automatically-add-data-set-name-on-output-title/m-p/576524#M23073</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-07-25T10:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to automatically add data set name on output title</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-automatically-add-data-set-name-on-output-title/m-p/576530#M23074</link>
      <description>The &amp;amp;SYSLAST macro-variable didn't work. It just returns a output with title 'Data set &amp;amp;SYSLAST all observations'. Any other ideas?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You are probably right about the character limits. However, I just made those up just for this example, so in reality I use different - shorter - names.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Jul 2019 11:02:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-automatically-add-data-set-name-on-output-title/m-p/576530#M23074</guid>
      <dc:creator>Robois</dc:creator>
      <dc:date>2019-07-25T11:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to automatically add data set name on output title</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-automatically-add-data-set-name-on-output-title/m-p/576612#M23076</link>
      <description>The difference between your TITLE statement and the solution TITLE statement is that you used single quotes. &amp;amp;SYSLAST will NOT resolve when it is enclosed within single quotes. It needs to be resolved within double quotes.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Thu, 25 Jul 2019 14:31:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-automatically-add-data-set-name-on-output-title/m-p/576612#M23076</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-07-25T14:31:06Z</dc:date>
    </item>
  </channel>
</rss>

