<?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: Adding trailing blanks to alphanumeric fields using computed coloumn option in SAS EG in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184271#M14146</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HHi&lt;/P&gt;&lt;P&gt;i have an alphanumeric field example : MM344&lt;/P&gt;&lt;P&gt;its format is $12. In properties now I need to add trailing blanks&lt;/P&gt;&lt;P&gt;and length shd be 25 . and then export that dataset&amp;nbsp; &lt;/P&gt;&lt;P&gt;as csv file &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Nov 2014 19:32:41 GMT</pubDate>
    <dc:creator>chennupriya</dc:creator>
    <dc:date>2014-11-24T19:32:41Z</dc:date>
    <item>
      <title>Adding trailing blanks to alphanumeric fields using computed coloumn option in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184269#M14144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;HHi ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;instead of writing a code how do we add trailing blanks to alphanumeric fields using computed coloumn in SAS EG before exporting data into CSV file &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 17:38:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184269#M14144</guid>
      <dc:creator>chennupriya</dc:creator>
      <dc:date>2014-11-24T17:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding trailing blanks to alphanumeric fields using computed coloumn option in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184270#M14145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All SAS character strings already are padded on the right with blanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So most likely your question is about how to generate a non standard CSV file that includes normally unwanted trailing blanks.&lt;/P&gt;&lt;P&gt;Why would you want to make a file in such a format? &lt;/P&gt;&lt;P&gt;Do you have more information on the required format since it is clearly not a normal CSV file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 18:17:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184270#M14145</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-11-24T18:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Adding trailing blanks to alphanumeric fields using computed coloumn option in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184271#M14146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HHi&lt;/P&gt;&lt;P&gt;i have an alphanumeric field example : MM344&lt;/P&gt;&lt;P&gt;its format is $12. In properties now I need to add trailing blanks&lt;/P&gt;&lt;P&gt;and length shd be 25 . and then export that dataset&amp;nbsp; &lt;/P&gt;&lt;P&gt;as csv file &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 19:32:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184271#M14146</guid>
      <dc:creator>chennupriya</dc:creator>
      <dc:date>2014-11-24T19:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Adding trailing blanks to alphanumeric fields using computed coloumn option in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184272#M14147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the FORMAT is just how the variable is displayed, but let's assume that your variable also has a length of 12.&amp;nbsp; You might get somewhere by just modifying the variable to use $25. format instead.&amp;nbsp; If you really need to change the length of the variable then you will need to create a new variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But a CSV file will NOT have the trailing spaces.&amp;nbsp; For example if you run this simple step you will see that the data for the character variable NAME does not have trailing spaces. The spaces are not needed because the commas serve as the delimiter between the fields. Hence the name Comma Separated Value (CSV).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;682&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&gt;683&amp;nbsp;&amp;nbsp; set sashelp.class ;&lt;/P&gt;&lt;P&gt;684&amp;nbsp;&amp;nbsp; file log dsd ;&lt;/P&gt;&lt;P&gt;685&amp;nbsp;&amp;nbsp; put (_all_) (:);&lt;/P&gt;&lt;P&gt;686&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Alfred,M,14,69,112.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Alice,F,13,56.5,84&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Barbara,F,13,65.3,98&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Carol,F,14,62.8,102.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Henry,M,14,63.5,102.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;James,M,12,57.3,83&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Jane,F,12,59.8,84.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Janet,F,15,62.5,112.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Jeffrey,M,13,62.5,84&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;John,M,12,59,99.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Joyce,F,11,51.3,50.5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Judy,F,14,64.3,90&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Louise,F,12,56.3,77&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Mary,F,15,66.5,112&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Philip,M,16,72,150&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Robert,M,12,64.8,128&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Ronald,M,15,67,133&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;Thomas,M,11,57.5,85&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;William,M,15,66.5,112&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 19:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184272#M14147</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-11-24T19:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding trailing blanks to alphanumeric fields using computed coloumn option in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184273#M14148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps your requirement is to output a fixed column format file instead of a CSV file?&amp;nbsp; That is easy to so using a data step.&amp;nbsp; Not sure if EG has a task to do that however.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; file 'mynewfile.txt' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put @1 name @26 age @30 sex ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 19:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184273#M14148</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-11-24T19:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Adding trailing blanks to alphanumeric fields using computed coloumn option in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184274#M14149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CCan we use subpad function&amp;nbsp; but I am confused of which length I can specify and which format I can specify in code when source has format $12. , length 12 and now result dataset format A25 . Thinking how to represent in code &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 21:57:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184274#M14149</guid>
      <dc:creator>chennupriya</dc:creator>
      <dc:date>2014-11-24T21:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Adding trailing blanks to alphanumeric fields using computed coloumn option in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184275#M14150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are writing your own code then just define the variable to the length you want. &lt;/P&gt;&lt;P&gt;If you are writing a data step then use the LENGTH statement to define the variable.&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; length new $25;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; new=old;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are writing SQL then use the LENGTH attribute&lt;/P&gt;&lt;P&gt;proc sql ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; create table want as select *,old as new length=25 from have ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 22:25:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Adding-trailing-blanks-to-alphanumeric-fields-using-computed/m-p/184275#M14150</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-11-24T22:25:03Z</dc:date>
    </item>
  </channel>
</rss>

