<?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 SPLIT FUNCTION NOT WORKING WITH ODS PDF in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46395#M6071</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; Many of the techniques you show, including the * as a split character are LISTING only options. You will probably not be able to have 1 program that will work for LISTING and PDF. You will need to use ODS ESCAPECHAR to insert a carriage return or line feed into your data before using it with ODS PDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Options like WIDTH, FLOW, HEADLINE, SPACING, etc are LISTING only options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2012 12:55:19 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2012-03-28T12:55:19Z</dc:date>
    <item>
      <title>SPLIT FUNCTION NOT WORKING WITH ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46394#M6070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using ODS to generate a PDF file. I would like to 'split' and print the data of a column based on a special character. For E.g., '*'. I'm using the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS version : SAS 8.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data final;&lt;BR /&gt;input factor category name $ name2 $;&lt;BR /&gt;cards;&lt;BR /&gt;2 34 abc*bac hgh*sgd&lt;BR /&gt;3 45 gcf*gdf ahd*has&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods pdf file ="c:\tmp\sample_test.pdf" ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc report data=final nocenter nowindows missing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spacing=1 headline headskip split='*' ;&amp;nbsp; &lt;BR /&gt;columns factor category name name2;&lt;BR /&gt;define factor / "normal" order order=data width=10;&lt;BR /&gt;define category / "cat" width=13;&lt;BR /&gt;define name / display width=6 flow; &lt;BR /&gt;define name2 / display width=6 flow; &lt;BR /&gt;run;&lt;BR /&gt;ods pdf close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The split option given in the proc report is working only in the report but not in the ODS PDF output. Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 07:56:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46394#M6070</guid>
      <dc:creator>Mart_Ind</dc:creator>
      <dc:date>2012-03-28T07:56:00Z</dc:date>
    </item>
    <item>
      <title>SPLIT FUNCTION NOT WORKING WITH ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46395#M6071</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; Many of the techniques you show, including the * as a split character are LISTING only options. You will probably not be able to have 1 program that will work for LISTING and PDF. You will need to use ODS ESCAPECHAR to insert a carriage return or line feed into your data before using it with ODS PDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Options like WIDTH, FLOW, HEADLINE, SPACING, etc are LISTING only options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 12:55:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46395#M6071</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-03-28T12:55:19Z</dc:date>
    </item>
    <item>
      <title>SPLIT FUNCTION NOT WORKING WITH ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46396#M6072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Cynthia, Thanks alot for your response. I'm bit confused about the same. If possible, could you please provide a sample peice of code so that I will try from my end?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, we are getting the data in a different format from external sources. (with a special character '^' inserted in between the data) . We need to split the data based on '^' and should generate a PDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For E.g;&lt;/P&gt;&lt;P&gt;Input data from External data sources&lt;BR /&gt;----------------------------------------------------&lt;/P&gt;&lt;P&gt;1 abc^bca&amp;nbsp;&amp;nbsp; ght^ygs&lt;BR /&gt;2 gde^acb&amp;nbsp;&amp;nbsp; age^adc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We want this to be printed in the output PDF as given below::&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 abc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ght&lt;BR /&gt;&amp;nbsp; bca&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ygs&lt;/P&gt;&lt;P&gt;2 gde&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ygs&lt;BR /&gt;&amp;nbsp; acb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; adc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 09:12:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46396#M6072</guid>
      <dc:creator>Mart_Ind</dc:creator>
      <dc:date>2012-03-29T09:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT FUNCTION NOT WORKING WITH ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46397#M6073</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; I have some code that illustrates the use of a newline character to split text in a cell. The way to do this with ODS is to use ODS ESCAPECHAR. In my code, I am reading in data and inserting the ESCAPECHAR controls into my data value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Since you already have data with a ^ (caret) as a special indicator of where a line feed should be inserted, then you would have to use functions like FIND, SUBSTR or TRANWRD to replace your ^ or * with the correct ESCAPECHAR function. As I said, the SPLIT character with PROC REPORT works in headers with ODS destinations, but within DATA cells, you would have to use ODS ESCAPECHAR functions to insert a line feed or new line character. The LISTING window or LISTING destination was the original way that output was created, so many procedures, like PROC REPORT and PROC TABULATE had some special options that were specific to how LISTING worked. Those same options generally do NOT work with ODS destinations like PDF, RTF and HTML that use proportional spaced fonts and style templates for styling the output. For example, the BOX option of PROC REPORT was originally created so PROC REPORT could have a box around the output like TABULATE, but that option is irrelevant in PDF, RTF or HTML, because each of those destinations puts the output in a table using destination-specific methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you are running SAS 9.1 or earlier, then you would need the original newline command, which was ESCAPECHAR+n:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ODS ESCAPECHAR='&lt;STRONG&gt;~&lt;/STRONG&gt;';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and then change your data from: abc^bca to: abc &lt;STRONG&gt;~n&lt;/STRONG&gt; bca &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using SAS 9.2 or 9.3, then you would change your data to use the ESCAPECHAR {newline} function, from: abc^bca to: abc&lt;STRONG&gt;~{newline 1}&lt;/STRONG&gt;bca&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code below produced the attached screenshot. To translate your data into a new text string, I think the TRANWRD function would work for you. Just be sure to make the new variables long enough to hold the data values and the inline formatting commands. Something like this (untested), assume your original variables are called STR1 and STR2:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; newstr91 = tranwrd(str1,'^',' ~n ');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; newstr92 = tranwrd(str2,'^',' ~{newline 1} ');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Note that for the PDF destination, your code MUST use the same ESCAPECHAR (~) in the ODS ESCAPECHAR statement and in the program/data. Also, if you use the changed data with the LISTING destination, you will see the ~n or ~{newline 1} in the LISTING window. ODS ignores REPORT options like WIDTH=, SPACING=, HEADLINE, HEADSKIP, FLOW, etc. And, LISTING ignores ODS specific features such as ESCAPECHAR functions and STYLE overrides. So, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;data jabber;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;length pline1 pline2 $100 lf_pline91 lf_pline92 $200;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;infile datalines dlm=',' dsd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;input linenum pline1 $ pline2 $;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;lf_pline91 = catx('~n',pline1, pline2);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;lf_pline92 = catx('~{newline 1}',pline1,pline2);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;return;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;1, "Twas brillig and the slithy toves","Did gyre and gimble in the wabe."&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;2, "All mimsy were the borogroves,","And the mome raths outgrabe."&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods listing close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;options orientation=landscape topmargin=.5in bottommargin=.5in&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leftmargin=.5in rightmargin=.5in;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods escapechar='~';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods pdf file ="c:\temp\sample_test.pdf" ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc report data=jabber nowd split='*' ; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title 'Data Uses ODS ESCAPECHAR'; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;columns linenum pline1 pline2 lf_pline91 lf_pline92;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;define linenum / "Number" order order=data;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;define pline1 / display "Header*Uses*Split*Character";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;define pline2 / display; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;define lf_pline91 / display; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;define lf_pline92 / display; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods pdf close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG style="font-size: 18pt; font-family: Courier New;"&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11705i69DB8329D077B4E9/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="use_newline_pdf.jpg" title="use_newline_pdf.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 16:45:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46397#M6073</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-03-29T16:45:27Z</dc:date>
    </item>
    <item>
      <title>SPLIT FUNCTION NOT WORKING WITH ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46398#M6074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks a lot cynthia. I will try as per your suggestions and let you know the updates. Thanks once again for your timely help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 07:49:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46398#M6074</guid>
      <dc:creator>Mart_Ind</dc:creator>
      <dc:date>2012-03-30T07:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: SPLIT FUNCTION NOT WORKING WITH ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46399#M6075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Cynthia&lt;/P&gt;&lt;P&gt;The code sample you give for &lt;A href="http://www.rasteredge.com/how-to/csharp-imaging/pdf-split/"&gt;&lt;SPAN style="color: #575757;"&gt;splitting PDF&lt;/SPAN&gt;&lt;/A&gt; text is of great help to me. I've save it and will try it later on &lt;A href="http://www.rasteredge.com/how-to/csharp-imaging/pdf-creating/"&gt;&lt;SPAN style="color: #575757;"&gt;generating PDF&lt;/SPAN&gt;&lt;/A&gt; with ODS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 01:13:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SPLIT-FUNCTION-NOT-WORKING-WITH-ODS-PDF/m-p/46399#M6075</guid>
      <dc:creator>longwest</dc:creator>
      <dc:date>2015-08-14T01:13:31Z</dc:date>
    </item>
  </channel>
</rss>

