<?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 Left or right align alpha variable values in a column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Left-or-right-align-alpha-variable-values-in-a-column/m-p/79219#M17101</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am looking around for a way to left or right align alpha variable values in a data set. I really found anything that would seem to work yet. Is there a way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 May 2013 15:12:20 GMT</pubDate>
    <dc:creator>Paul_NYS</dc:creator>
    <dc:date>2013-05-19T15:12:20Z</dc:date>
    <item>
      <title>Left or right align alpha variable values in a column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Left-or-right-align-alpha-variable-values-in-a-column/m-p/79219#M17101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am looking around for a way to left or right align alpha variable values in a data set. I really found anything that would seem to work yet. Is there a way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 May 2013 15:12:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Left-or-right-align-alpha-variable-values-in-a-column/m-p/79219#M17101</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-05-19T15:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Left or right align alpha variable values in a column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Left-or-right-align-alpha-variable-values-in-a-column/m-p/79220#M17102</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; You can left or right align variables when you display them on a &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;REPORT&lt;/STRONG&gt;&lt;/SPAN&gt;, but SAS does not store anything about "justification" or "alignment" in the descriptor portion of the SAS &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;DATASET&lt;/STRONG&gt;&lt;/SPAN&gt;. The information that does get stored is information like: variable length, variable label, variable informat, variable format and this information could be used by a procedure at report time to display the variable values. For example, the number 12345, might be displayed different ways, depending on whether the stored format was comma8. or comma8.3 or dollar10.2. However, there is nothing about alignment that would be useful when storing a number on disk. Text alignment or number alignment on a report really depends on whether the report format supports control of text alignment -- generally speaking, you can influence alignment in ODS destinations better than in the LISTING destination (or Output Window).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Typically, for reports, numeric variables are right-aligned or right-justified and character variables are left-aligned or left-justified, but, depending on your procedure and your destination of choice (LISTING vs HTML, RTF, PDF), you can have an impact on the alignment of a variable header and values at report time. See the program below using PROC PRINT. There would be slightly different syntax for PROC REPORT and PROC TABULATE.&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;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\change_just.html';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods rtf file='c:\temp\change_just.rtf';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods pdf file='c:\temp\change_just.pdf';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods csv file='c:\temp\csv_just.csv';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc print data=sashelp.class noobs&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; style(header)={just=c};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; var name / style(data)={just=r width=1.5in};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; var age / style(data)={just=c width=1.0in};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; var height / style(data)={just=l width=.75in};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; var weight / style(data)={just=c width=.75in};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&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, 19 May 2013 16:50:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Left-or-right-align-alpha-variable-values-in-a-column/m-p/79220#M17102</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-05-19T16:50:08Z</dc:date>
    </item>
  </channel>
</rss>

