<?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: Splitting Word in Output in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Re-Splitting-Word-in-Output/m-p/215011#M14137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; To add to the suggestion of ODS TEXT=, if you want to control the placement of the line breaks or "line feeds", you can use ODS ESCAPECHAR with the {NEWLINE} function, as shown here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;IMG alt="show_text.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/11027_show_text.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;produced by the code below. I typically use long text strings for inserted text and so I put the text itself into a series of macro variables, which separates the string from the place where the string is used and avoids any issues on some operating systems of programs with quoted text strings wrapping on multiple lines in the program editor. I also like to put my last trailing space into a %str( ) which seems to avoid the issue that occurs sometimes when trailing blanks are suppressed. STARTPAGE=NO is necessary in PDF and RTF, if you want the TEXT To appear immediately before or after the output and not appear on the next page.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let customer= Kermit The Frog;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let customerID = 123_SS;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let fromdate = 10Nov1969;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let todate = %sysfunc(propcase(&amp;amp;sysdate9));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let part1 = A query for the Sales History for &amp;amp;Customer with Customer_ID: &amp;amp;CustomerID for%str( );&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let part2 = the period &amp;amp;fromdate to &amp;amp;todate has revealed that no purchases have been made by this%str( );&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let part3 = customer during this time period.%str( ) ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let part4 = Because it is not easy being green, Kermit does not have any credit cards.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods escapechar='^';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\showtext_1.html';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods pdf file='c:\temp\showtext_1.pdf' startpage=no;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods rtf file='c:\temp\showtext_1.rtf' startpage=no;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc print data=sashelp.class(obs=3);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title '1) Example with ODS TEXT';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods text="1) &amp;amp;part1.&amp;amp;part2.&amp;amp;part3.&amp;amp;part4";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods text="^{newline 3}2) &amp;amp;part4^{newline 3}&amp;amp;part1.&amp;amp;part2.&amp;amp;part3";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 Jun 2015 14:40:13 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2015-06-28T14:40:13Z</dc:date>
    <item>
      <title>Re: Splitting Word in Output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Re-Splitting-Word-in-Output/m-p/215009#M14135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi....I am trying to insert a statement in a report and the result is having a word split when it has to start a new line. Is there any way of preventing this. Thanks,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;DATA _NULL_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;FILE PRINT;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;PUT &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;"A query for the Sales History for &amp;amp;Customer with Customer_ID: &amp;amp;CustomerID for the period &amp;amp;fromdate to &amp;amp;todate has revealed that no purchases have been made by this customer during this time period."&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;END;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;RUN;&lt;/SPAN&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTPUT:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial,Regular; font-size: 8pt;"&gt;A query for the Sales History for James_Mars with Cutomer_ID: 112232784 for the period 20140101 to 20150531 has revealed tha&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial,Regular; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t no purchases have been made by this customer during this time period&lt;/SPAN&gt;&lt;SPAN style="font-family: Arial,Regular; font-size: 9.5pt;"&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 19:22:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Re-Splitting-Word-in-Output/m-p/215009#M14135</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2015-06-26T19:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting Word in Output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Re-Splitting-Word-in-Output/m-p/215010#M14136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PUT is not very smart and likely something like the file default number of columns is going on. Check your LINESIZE setting, if it is around 124 that's a likely cause. &lt;/P&gt;&lt;P&gt;If I were attempting this with Put statements I would break them up to use no more than 80 columns of text per PUT but that could have other issues with margins not aligning with other bits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is part of a longer program I would try instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODS text="A query for the Sales History for &amp;amp;Customer with Customer_ID: &amp;amp;CustomerID for &lt;/P&gt;&lt;P&gt; the period &amp;amp;fromdate to &amp;amp;todate has revealed that no purchases have been made by this &lt;/P&gt;&lt;P&gt; customer during this time period.";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note there is an intentional space at the beginning of each of the second and third lines of text. The ODS parser, for lack of a better name tends to combine the last work of the previous line with the first of subsequent without that space in my experience. Note that will likely get warnings about "current line length has exceeded ... may have unbalanced quotes".&lt;/P&gt;&lt;P&gt;The ODS text has the advantage that it usually wraps lines as the target destination displays them. For RTF or PDF that means usually a word boundary break and for html then the text wrap changes with displayed width of the page.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 19:59:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Re-Splitting-Word-in-Output/m-p/215010#M14136</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-06-26T19:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting Word in Output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Re-Splitting-Word-in-Output/m-p/215011#M14137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; To add to the suggestion of ODS TEXT=, if you want to control the placement of the line breaks or "line feeds", you can use ODS ESCAPECHAR with the {NEWLINE} function, as shown here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;IMG alt="show_text.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/11027_show_text.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;produced by the code below. I typically use long text strings for inserted text and so I put the text itself into a series of macro variables, which separates the string from the place where the string is used and avoids any issues on some operating systems of programs with quoted text strings wrapping on multiple lines in the program editor. I also like to put my last trailing space into a %str( ) which seems to avoid the issue that occurs sometimes when trailing blanks are suppressed. STARTPAGE=NO is necessary in PDF and RTF, if you want the TEXT To appear immediately before or after the output and not appear on the next page.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let customer= Kermit The Frog;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let customerID = 123_SS;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let fromdate = 10Nov1969;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let todate = %sysfunc(propcase(&amp;amp;sysdate9));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let part1 = A query for the Sales History for &amp;amp;Customer with Customer_ID: &amp;amp;CustomerID for%str( );&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let part2 = the period &amp;amp;fromdate to &amp;amp;todate has revealed that no purchases have been made by this%str( );&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let part3 = customer during this time period.%str( ) ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%let part4 = Because it is not easy being green, Kermit does not have any credit cards.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods escapechar='^';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\showtext_1.html';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods pdf file='c:\temp\showtext_1.pdf' startpage=no;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods rtf file='c:\temp\showtext_1.rtf' startpage=no;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc print data=sashelp.class(obs=3);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title '1) Example with ODS TEXT';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods text="1) &amp;amp;part1.&amp;amp;part2.&amp;amp;part3.&amp;amp;part4";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods text="^{newline 3}2) &amp;amp;part4^{newline 3}&amp;amp;part1.&amp;amp;part2.&amp;amp;part3";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jun 2015 14:40:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Re-Splitting-Word-in-Output/m-p/215011#M14137</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-06-28T14:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting Word in Output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Re-Splitting-Word-in-Output/m-p/215012#M14138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ballardw &amp;amp; Cynthia.....your help and suggestions were very informative and helpful....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 00:30:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Re-Splitting-Word-in-Output/m-p/215012#M14138</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2015-06-30T00:30:21Z</dc:date>
    </item>
  </channel>
</rss>

