<?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 add two titles seperately in a dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-add-two-titles-seperately-in-a-dataset/m-p/325671#M72463</link>
    <description>&lt;P&gt;Titles don't exist within a dataset, only for reports.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at Example 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/lestmtsref/69738/HTML/default/viewer.htm#p10gcmrmf83iaxn1ilrx4pra969n.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/lestmtsref/69738/HTML/default/viewer.htm#p10gcmrmf83iaxn1ilrx4pra969n.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will need a variable to differentiate the datasets, look at the INDSNAME option to capture the name of the dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data all;&lt;/P&gt;
&lt;P&gt;length source dsname $50.;&lt;/P&gt;
&lt;P&gt;set pl plc INDSNAME=source;&lt;/P&gt;
&lt;P&gt;dsname=source;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2017 14:05:13 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-01-18T14:05:13Z</dc:date>
    <item>
      <title>how to add two titles seperately in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-add-two-titles-seperately-in-a-dataset/m-p/325666#M72462</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to combine two dataset: PL and PLC vertically,&lt;/P&gt;&lt;P&gt;so I use the&lt;/P&gt;&lt;P&gt;data all;&lt;/P&gt;&lt;P&gt;set PL PLC;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope the output will show: a title for PL and a title for PLC in one dataset , does anyone know how and where can I add that please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 13:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-add-two-titles-seperately-in-a-dataset/m-p/325666#M72462</guid>
      <dc:creator>septemberbulb</dc:creator>
      <dc:date>2017-01-18T13:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to add two titles seperately in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-add-two-titles-seperately-in-a-dataset/m-p/325671#M72463</link>
      <description>&lt;P&gt;Titles don't exist within a dataset, only for reports.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at Example 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/lestmtsref/69738/HTML/default/viewer.htm#p10gcmrmf83iaxn1ilrx4pra969n.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/lestmtsref/69738/HTML/default/viewer.htm#p10gcmrmf83iaxn1ilrx4pra969n.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will need a variable to differentiate the datasets, look at the INDSNAME option to capture the name of the dataset.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data all;&lt;/P&gt;
&lt;P&gt;length source dsname $50.;&lt;/P&gt;
&lt;P&gt;set pl plc INDSNAME=source;&lt;/P&gt;
&lt;P&gt;dsname=source;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-add-two-titles-seperately-in-a-dataset/m-p/325671#M72463</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-01-18T14:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to add two titles seperately in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-add-two-titles-seperately-in-a-dataset/m-p/325699#M72478</link>
      <description>&lt;P&gt;Reeza's tools can help, but you may need some programming as well.&amp;nbsp; You may need to add a variable to the data set that holds the text you want to insert into the title (possibly the entire text, as in this example below).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set PL (in=in1) PLC (in=in2);&lt;/P&gt;
&lt;P&gt;length title_text $ 50;&lt;/P&gt;
&lt;P&gt;if in1 then title_text = 'I want to use this title for the PL observations';&lt;/P&gt;
&lt;P&gt;else title_text = 'Exceptions were also added by the PLC observations';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can use this text as titles by adding a BY statement and #BYVAL:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc print data=want;&lt;/P&gt;
&lt;P&gt;by title_text notsorted;&lt;/P&gt;
&lt;P&gt;title '#BYVAL1';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So SAS isn't really built to do what you ask, but you can work around that even without using ODS.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 15:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-add-two-titles-seperately-in-a-dataset/m-p/325699#M72478</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-01-18T15:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to add two titles seperately in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-add-two-titles-seperately-in-a-dataset/m-p/325709#M72484</link>
      <description>thank you. learned a lot</description>
      <pubDate>Wed, 18 Jan 2017 15:39:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-add-two-titles-seperately-in-a-dataset/m-p/325709#M72484</guid>
      <dc:creator>septemberbulb</dc:creator>
      <dc:date>2017-01-18T15:39:20Z</dc:date>
    </item>
  </channel>
</rss>

