<?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: Line break for dashed-words in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522600#M141909</link>
    <description>&lt;P&gt;Yes, thanks.&amp;nbsp; EscCharacter is what I am using now on an ad hoc basis.&amp;nbsp; But, as you noted, that's not what I need.&amp;nbsp; In my case, what is printed is a format for a numeric value.&amp;nbsp; I need it to work across multiple different deployments.&amp;nbsp; Forcing a line-break is not what I want when it is used as a row header.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Dec 2018 15:50:02 GMT</pubDate>
    <dc:creator>Haris</dc:creator>
    <dc:date>2018-12-19T15:50:02Z</dc:date>
    <item>
      <title>Line break for dashed-words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522560#M141895</link>
      <description>&lt;P&gt;Is there a way to tell SAS to treat dashed-words as two separate words when determining when to insert a line break?&amp;nbsp; Currently, a 'dashed-word' is treated as a single word and, at the end of the line, line-break is not inserted after the dash--the whole dashed-word is moved to a new line if it does not fit.&amp;nbsp; There must be an option that would tell SAS to leave 'dashed-' at the end of the line and place 'word' on the new line.&amp;nbsp; Currently, I am inserting a space between the dash '-' and the word 'word'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Haris&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 15:23:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522560#M141895</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2018-12-19T15:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Line break for dashed-words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522565#M141897</link>
      <description>&lt;P&gt;What SAS PROC or application (&lt;EM&gt;e.g.&lt;/EM&gt; Visual Analytics) are you doing this in?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 15:26:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522565#M141897</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-12-19T15:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Line break for dashed-words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522582#M141903</link>
      <description>&lt;P&gt;Multiple procs.&amp;nbsp; Specifically, I used in PROC SGPLOT as a value label, PROC REPORT as a column header as well as a row header, PROC ODSTEXT, etc.&amp;nbsp; If there are PROCs that support this kind of functionality and others that don't, I'd like to know that too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: so, apparently, both PROC PRINT and PROC report do this correctly with text in the cells--they both break a line at the dash.&amp;nbsp; PROC SGPLOT does not break at the dash when labeling values on x axis.&amp;nbsp; I will need to double-check how dash is treated in PROC REPORT column headers.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 15:43:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522582#M141903</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2018-12-19T15:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Line break for dashed-words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522590#M141905</link>
      <description>&lt;P&gt;In PROC REPORT, I myself tell it where to place line breaks in the column headers. I haven't done this in PROC SGPLOT, so that's something you can try yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods escapechar='^';

proc report data=sashelp.class;
    columns name;
	define name/group "What is^{newline 1}the Student's^{newline 1}Name?";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I realize that's not exactly the same as what you are asking for, where SAS does the splitting at a hyphen automatically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 15:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522590#M141905</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-12-19T15:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Line break for dashed-words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522600#M141909</link>
      <description>&lt;P&gt;Yes, thanks.&amp;nbsp; EscCharacter is what I am using now on an ad hoc basis.&amp;nbsp; But, as you noted, that's not what I need.&amp;nbsp; In my case, what is printed is a format for a numeric value.&amp;nbsp; I need it to work across multiple different deployments.&amp;nbsp; Forcing a line-break is not what I want when it is used as a row header.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 15:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522600#M141909</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2018-12-19T15:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Line break for dashed-words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522672#M141941</link>
      <description>&lt;P&gt;Show your 1) proc sgplot code 2) example data and 3) tell us which release of SAS you are using.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you say this is for an axis label then the appropriate axis statement can use the SPLITCHAR SPLITCHARNODROP and SPLITJUSTIFY options if using 9.4 (at least) or later. You may have issues related to FITPOLICY if you are attempting to display a lot of values also.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also there is a potential issue of exactly which "dash" character is in your data versus the code you submit. The "-" on the keyboard for programming may not be an emdash or other word processing/ Unicode character dash in your data.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 18:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522672#M141941</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-12-19T18:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Line break for dashed-words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522688#M141945</link>
      <description>&lt;P&gt;Thanks Ballardw,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This very close to what I need.&amp;nbsp; I did not know about the SPLITCHARNODROP.&amp;nbsp; Very useful.&amp;nbsp; Only one problem remains: I need the program to treat a *space* as a break as well as the *hyphen* character.&amp;nbsp; I need the labels to split into three lines.&amp;nbsp; Is there a way to specify more than one SPLITCHAR?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't rotate the value labels as the y-axis space is at a premium and x-axis categories can be wordy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data g;
input Cat$ 16. Value;
cards;
OneH-TwoH Three1 4
One Two Three2   3
OneH-TwoH Three3 2
One Two Three4   1
OneH-TwoH Three5 4
One Two Three6   5
OneH-TwoH Three7 2
One Two Three8   3
;


proc sgplot data=g;
vbar Cat / response=Value;
xaxis fitpolicy=splitalways splitchar='-' splitcharnodrop;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Dec 2018 20:40:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522688#M141945</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2018-12-19T20:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Line break for dashed-words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522711#M141956</link>
      <description>&lt;P&gt;Try placing both characters in the SPLITCHAR option.&lt;/P&gt;
&lt;P&gt;When I run your code on SAS 9.4 modified as&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=g;
vbar Cat / response=Value;
xaxis fitpolicy=splitalways splitchar='- ' splitcharnodrop ;
run;


&lt;/PRE&gt;
&lt;P&gt;each of the labels are displayed as three rows and the dashes are displayed at the end of the split as needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 21:25:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522711#M141956</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-12-19T21:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Line break for dashed-words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522714#M141958</link>
      <description>Brilliant!  Done and Done!&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Dec 2018 21:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-break-for-dashed-words/m-p/522714#M141958</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2018-12-19T21:33:47Z</dc:date>
    </item>
  </channel>
</rss>

