<?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: Creating subscripts and superscripts in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-subscripts-and-superscripts/m-p/409390#M100023</link>
    <description>&lt;P&gt;What "does not work"? You have posted code which creates a PDF file, and yet your example output is Excel? The escapechar and sub works fine using PDF destination output (note I can only paste text at the mo):&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;ods pdf file="s:\temp\rob\test.pdf";&lt;/P&gt;
&lt;P&gt;data temp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; a="abc ^{sub 4}";&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods escapechar="^";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc report data=temp nowd;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;columns a;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;ods pdf close;&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;Works fine. Also please note how formatting of the code is very important to reading, mixed case and no indetation makes reading code so much harder.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Nov 2017 09:42:55 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-11-01T09:42:55Z</dc:date>
    <item>
      <title>Creating subscripts and superscripts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-subscripts-and-superscripts/m-p/409378#M100019</link>
      <description>&lt;P&gt;I have a table win which one of the cells has an entry (mg/L as SO4). How do I express the 4 in the cell entry as a subscript&amp;nbsp;with the PRC REPORT Statement. See attached file. I tried the code below but it does not get me the right information&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;nbsp;
Libname tested 'C:\Users\Test_LIBR';
ods pdf file="&amp;amp;tested\Filename.pdf";
ods escapechar="^";
DATA test2;
SET test;
format United $35.;Informat United $35.;
Format Position $4.;
Position = Index(Units,'4)');
If Position gt 0 Then United = Trim(Substr(Units,1,Position-1)||'^{Sub 4}')||')';
Else United = Units;
run;
Proc report data = work.test2;
Column Determinand_Grouping Determinand United units;
define Determinand_Grouping / group order = data noprint;
Define Determinand / style(column)=[fontstyle=italic];
Define Units / style(column)=[fontstyle=italic];
run;
ods _all_ close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 08:34:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-subscripts-and-superscripts/m-p/409378#M100019</guid>
      <dc:creator>mmohotsi</dc:creator>
      <dc:date>2017-11-01T08:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating subscripts and superscripts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-subscripts-and-superscripts/m-p/409390#M100023</link>
      <description>&lt;P&gt;What "does not work"? You have posted code which creates a PDF file, and yet your example output is Excel? The escapechar and sub works fine using PDF destination output (note I can only paste text at the mo):&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;ods pdf file="s:\temp\rob\test.pdf";&lt;/P&gt;
&lt;P&gt;data temp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; a="abc ^{sub 4}";&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods escapechar="^";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc report data=temp nowd;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;columns a;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;ods pdf close;&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;Works fine. Also please note how formatting of the code is very important to reading, mixed case and no indetation makes reading code so much harder.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 09:42:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-subscripts-and-superscripts/m-p/409390#M100023</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-11-01T09:42:55Z</dc:date>
    </item>
  </channel>
</rss>

