<?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 string into multiple lines via PROC REPORT in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Splitting-string-into-multiple-lines-via-PROC-REPORT/m-p/392711#M19224</link>
    <description>&lt;P&gt;If I understand you correctly you appear to be trying to turn your columns of data into rows just using PROC REPORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An easier approach might be to transform your data first by creating a general text column that contains name on row 1, address on row 2, city on row 3, state on row 4 and so on. You could use a DATA step or PROC TRANSPOSE for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once your data is transformed it makes your PROC REPORT a lot easier.&lt;/P&gt;</description>
    <pubDate>Sat, 02 Sep 2017 04:14:48 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2017-09-02T04:14:48Z</dc:date>
    <item>
      <title>Splitting string into multiple lines via PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Splitting-string-into-multiple-lines-via-PROC-REPORT/m-p/392706#M19223</link>
      <description>&lt;P&gt;Is there anyway to make the designated SPLIT value apply to strings displayed through the table besides main and column titles? I'm using SAS 9.4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I pre-incorporated in one test but it didn't seem to work. It didn't work either even when I tried concatenating some string variables via COMPUTE block in PROC REPORT. What am I missing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data addy;
  infile datalines dlm='|';
  input name ~$15. address ~$15. city $ state $;
datalines;
Debby Jones|1234 Johnny St|Chicago|IL
Joe Smith|2345 Bobby Dr|New York|NY
Ron Lee|3456 Suzy Ln|Miami|FL
;
run;

data addy_report_feed;
  set addy;
  catty=catx('~',name,address,catx(', ',city,state));
run;

/* test 1 */
proc report data=addy_report_feed split='~';
  column state city name catty;

  define state / display noprint order=internal;
  define city / display noprint order=internal;
  define name / display noprint order=internal;
  define catty / group 'Mailing~Address' flow width=30;

  break after catty / skip;
run;

/* test 2 */
proc report data=addy_report_feed split='~';
  column state city address name addblock;

  define state / display noprint order=internal;
  define city / display noprint order=internal;
  define address / display noprint order=internal;
  define name / display noprint order=internal;
  define addblock / computed 'Mailing~Address' flow width=30;

  compute addblock / char length=40;
	addblock=catx('~',name,address,catx(', ',city,state));
  endcomp;

/*  break after addblock / skip;*/
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2017 01:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Splitting-string-into-multiple-lines-via-PROC-REPORT/m-p/392706#M19223</guid>
      <dc:creator>BigPete</dc:creator>
      <dc:date>2017-09-02T01:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting string into multiple lines via PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Splitting-string-into-multiple-lines-via-PROC-REPORT/m-p/392711#M19224</link>
      <description>&lt;P&gt;If I understand you correctly you appear to be trying to turn your columns of data into rows just using PROC REPORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An easier approach might be to transform your data first by creating a general text column that contains name on row 1, address on row 2, city on row 3, state on row 4 and so on. You could use a DATA step or PROC TRANSPOSE for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once your data is transformed it makes your PROC REPORT a lot easier.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2017 04:14:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Splitting-string-into-multiple-lines-via-PROC-REPORT/m-p/392711#M19224</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-09-02T04:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting string into multiple lines via PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Splitting-string-into-multiple-lines-via-PROC-REPORT/m-p/392725#M19226</link>
      <description>&lt;P&gt;Use escapechar:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;ods escapechar='^';&lt;BR /&gt;.................&lt;BR /&gt;compute&lt;/SPAN&gt; addblock &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;char&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;length&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;40&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	addblock&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;catx&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'^n'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;name&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;address&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;catx&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;', '&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;city&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;state&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="token keyword"&gt;endcomp&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fixed a problem&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2017 11:07:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Splitting-string-into-multiple-lines-via-PROC-REPORT/m-p/392725#M19226</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-09-02T11:07:16Z</dc:date>
    </item>
  </channel>
</rss>

