<?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: Right aligned numeric fields doing export on TXT fixed lenght using schema.ini in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102448#M8979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris, thanks for your answer.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I prefer don't write code but I'll study your suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Aug 2013 09:05:47 GMT</pubDate>
    <dc:creator>loky</dc:creator>
    <dc:date>2013-08-07T09:05:47Z</dc:date>
    <item>
      <title>Right aligned numeric fields doing export on TXT fixed lenght using schema.ini</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102444#M8975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm doing a query between two sequential files that i've imported in sas using "sas enterprise guide".&lt;/P&gt;&lt;P&gt;The result is a new dataset that i must export in a sequential txt fixed lenght.&lt;/P&gt;&lt;P&gt;I've used the file schema.ini to defined the type and the lenght of all the fileds.&lt;/P&gt;&lt;P&gt;I'm not able to put&amp;nbsp; numeric fileds right aligned. &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;I've used only three process: import, query and export.&lt;/P&gt;&lt;P&gt;Any help please ?&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 09:28:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102444#M8975</guid>
      <dc:creator>loky</dc:creator>
      <dc:date>2013-08-06T09:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Right aligned numeric fields doing export on TXT fixed lenght using schema.ini</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102445#M8976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Loky&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a workaround you can use, by converting your numbers to right-aligned character fields BEFORE exporting them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start a new query on your file, and add all of the fields EXCEPT your numbers to the "Select Data" pane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, for each number that you want right aligned:&lt;/P&gt;&lt;P&gt;Create a new advanced expression;&lt;/P&gt;&lt;P&gt;In the advanced expression, enter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; right(put(xxxxx, 5.))&lt;/P&gt;&lt;P&gt;where xxxxx is your variable name, and 5 is the number of characters you want the field to occupy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finish defining the advanced expression, and when you run the query you should have a correctly defined character field, that you can export.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 14:02:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102445#M8976</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2013-08-06T14:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Right aligned numeric fields doing export on TXT fixed lenght using schema.ini</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102446#M8977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're willing to write a little bit of code, you will find that you have more flexibility in creating a flat file in the exact format that you need using DATA step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can automate the "transfer" of that file from SAS to your local PC using this technique:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2013/05/20/export-and-download-any-file-from-sas-enterprise-guide/" title="http://blogs.sas.com/content/sasdummy/2013/05/20/export-and-download-any-file-from-sas-enterprise-guide/"&gt; Export and download any file from SAS Enterprise Guide - The SAS Dummy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 14:07:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102446#M8977</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-08-06T14:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Right aligned numeric fields doing export on TXT fixed lenght using schema.ini</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102447#M8978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi TomKari, you have open me a world.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've modified your advanced expression to right aligned and to replace space with zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;translate(right(put(nameofthefield, numberofcharacter.)),"0"," ")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Aug 2013 09:02:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102447#M8978</guid>
      <dc:creator>loky</dc:creator>
      <dc:date>2013-08-07T09:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Right aligned numeric fields doing export on TXT fixed lenght using schema.ini</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102448#M8979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris, thanks for your answer.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I prefer don't write code but I'll study your suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Aug 2013 09:05:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102448#M8979</guid>
      <dc:creator>loky</dc:creator>
      <dc:date>2013-08-07T09:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Right aligned numeric fields doing export on TXT fixed lenght using schema.ini</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102449#M8980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, Loky&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad I could help. Functions and formats in SAS are amazing!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;translate(right(put(xxxxx, 5.)),"0"," ")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put(nameofthefield, z5.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The zn. format in SAS automatically zero-fills the number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Aug 2013 00:53:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102449#M8980</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2013-08-10T00:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Right aligned numeric fields doing export on TXT fixed lenght using schema.ini</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102450#M8981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The RIGHT() function is not doing anything in that expression. PUT() always places the number on the right of the string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Aug 2013 15:00:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Right-aligned-numeric-fields-doing-export-on-TXT-fixed-lenght/m-p/102450#M8981</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-08-10T15:00:40Z</dc:date>
    </item>
  </channel>
</rss>

