<?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 How to decide the length of a variable at once without trail and error in SQL? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-decide-the-length-of-a-variable-at-once-without-trail-and/m-p/79970#M23005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi SAS Community,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have a different data set (attached). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #575757; font-size: 10pt;"&gt;I have got the sum of variables named “principal” and “write_off_total” by account_number using below sql code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: yellow; font-size: 10pt;"&gt;(PGStats and SGB have improved this code).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;create&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; want &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(bank_number)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; bank_number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left((put(min (ACCOUNT_NUMBER),&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;7.&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;))) &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; ACCOUNT_NUMBER&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(country)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; country&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left((put(min(branch_number),&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;15.&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;)))&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; branch_number&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(currency_code)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; currency_code&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max (POST_DATE)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; POST_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp; Format=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 9pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max (EFFECTIVE_DATE)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; EFFECTIVE_DATE Format=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 9pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (PRINCIPAL)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; sum_PRINCIPAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (Write_off_Total)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; net_Write_off_Total&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; a.post_this_data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;group&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; account_number&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: #0000ff; font-size: 9pt;"&gt;Problems:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -0.5in; padding-left: 67px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;SPAN class="pasted-list-info"&gt;i)&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;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 9pt;"&gt;Variable “ACCOUNT_NUMBER” in the created data set “want” has awkward values (e.g. 7.59E10)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -0.5in; padding-left: 67px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;SPAN class="pasted-list-info"&gt;ii)&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;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 9pt;"&gt;Variable “branch_number” seemingly have more space than necessary. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff00ff; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-indent: -0.5in; padding-left: 67px;"&gt;&lt;STRONG style="color: #ff00ff;"&gt;&lt;SPAN style="font-size: 9pt;"&gt;&lt;SPAN class="pasted-list-info"&gt;i)&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;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;Is there any method to decide the optimum length of these variables (or can we decide optimum length of any variable in a given data set at once – without trail and error)? &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-indent: -0.5in; padding-left: 67px;"&gt;&lt;STRONG style="color: #ff00ff;"&gt;&lt;SPAN style="font-size: 9pt;"&gt;&lt;SPAN class="pasted-list-info"&gt;ii)&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;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;I need “Post_date” and “effective_date” variables in date9. format but code doesn’t give it?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;Your help is highly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;Mirisiage&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2012 19:29:41 GMT</pubDate>
    <dc:creator>Mirisage</dc:creator>
    <dc:date>2012-07-31T19:29:41Z</dc:date>
    <item>
      <title>How to decide the length of a variable at once without trail and error in SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-decide-the-length-of-a-variable-at-once-without-trail-and/m-p/79970#M23005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi SAS Community,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have a different data set (attached). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #575757; font-size: 10pt;"&gt;I have got the sum of variables named “principal” and “write_off_total” by account_number using below sql code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: yellow; font-size: 10pt;"&gt;(PGStats and SGB have improved this code).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;create&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; want &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(bank_number)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; bank_number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left((put(min (ACCOUNT_NUMBER),&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;7.&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;))) &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; ACCOUNT_NUMBER&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(country)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; country&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left((put(min(branch_number),&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;15.&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;)))&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; branch_number&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(currency_code)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; currency_code&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max (POST_DATE)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; POST_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp; Format=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 9pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max (EFFECTIVE_DATE)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; EFFECTIVE_DATE Format=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 9pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (PRINCIPAL)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; sum_PRINCIPAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (Write_off_Total)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; net_Write_off_Total&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; a.post_this_data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;group&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; account_number&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: #0000ff; font-size: 9pt;"&gt;Problems:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -0.5in; padding-left: 67px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;SPAN class="pasted-list-info"&gt;i)&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;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 9pt;"&gt;Variable “ACCOUNT_NUMBER” in the created data set “want” has awkward values (e.g. 7.59E10)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: -0.5in; padding-left: 67px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;SPAN class="pasted-list-info"&gt;ii)&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;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 9pt;"&gt;Variable “branch_number” seemingly have more space than necessary. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff00ff; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-indent: -0.5in; padding-left: 67px;"&gt;&lt;STRONG style="color: #ff00ff;"&gt;&lt;SPAN style="font-size: 9pt;"&gt;&lt;SPAN class="pasted-list-info"&gt;i)&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;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;Is there any method to decide the optimum length of these variables (or can we decide optimum length of any variable in a given data set at once – without trail and error)? &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-indent: -0.5in; padding-left: 67px;"&gt;&lt;STRONG style="color: #ff00ff;"&gt;&lt;SPAN style="font-size: 9pt;"&gt;&lt;SPAN class="pasted-list-info"&gt;ii)&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;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt;"&gt;I need “Post_date” and “effective_date” variables in date9. format but code doesn’t give it?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;Your help is highly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;Mirisiage&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 19:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-decide-the-length-of-a-variable-at-once-without-trail-and/m-p/79970#M23005</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2012-07-31T19:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to decide the length of a variable at once without trail and error in SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-decide-the-length-of-a-variable-at-once-without-trail-and/m-p/79971#M23006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Optimum for file size or readability?&amp;nbsp; Would using best32. for those variables suffice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 20:28:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-decide-the-length-of-a-variable-at-once-without-trail-and/m-p/79971#M23006</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-07-31T20:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to decide the length of a variable at once without trail and error in SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-decide-the-length-of-a-variable-at-once-without-trail-and/m-p/79972#M23007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are not doing arithmetic with a "number" such as account number it probably should not be a numeric but should be a string. Then you won't get the supprises when you try to format a long number into a shorter string. You have an account number with 10 significant digits and you tried to make it fit into 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar, your branch number probably shouldn't be numeric either. Then the "problem" related to those goes back to whoever designs the original table to make sure they are big enough. But if you have codes that vary from 1234567890 to 12 you are going to have excess space for some.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you get for your date values? Hard to trouble shoot without examples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 21:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-decide-the-length-of-a-variable-at-once-without-trail-and/m-p/79972#M23007</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-07-31T21:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to decide the length of a variable at once without trail and error in SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-decide-the-length-of-a-variable-at-once-without-trail-and/m-p/79973#M23008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; text-decoration: underline; font-family: 'Courier New';"&gt;Hi Art297,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;Thank you very much. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;I have replaced the lengths with best32., it worked. No more awkward values for &lt;/STRONG&gt;&lt;SPAN lang="EN" style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;“ACCOUNT_NUMBER” in the created data set “want”.&lt;/SPAN&gt;&lt;STRONG&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: yellow; font-family: 'Courier New';"&gt;BTW, what is the difference between optimum for file size and readability?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;create&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; want &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(bank_number)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; bank_number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left((put(min (ACCOUNT_NUMBER),&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: yellow; color: teal; font-size: 9pt;"&gt;best32.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;))) &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; ACCOUNT_NUMBER&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(country)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; country&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left((put(min(branch_number),&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: yellow; color: teal; font-size: 9pt;"&gt;best32.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;)))&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; branch_number&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(currency_code)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; currency_code&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max (POST_DATE)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; POST_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp; Format=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 9pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max (EFFECTIVE_DATE)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; EFFECTIVE_DATE Format=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 9pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (PRINCIPAL)&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;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; sum_PRINCIPAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum (Write_off_Total)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; net_Write_off_Total&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; a.post_this_data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;group&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 9pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt; account_number&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: fuchsia; background: white; font-family: 'Courier New'; text-decoration: underline;"&gt;Hi Ballardw,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;When I ran the above code on the &lt;SPAN style="text-decoration: underline;"&gt;attached data set&lt;/SPAN&gt;, the values I get for two "date-related" variables are like below. How could I get date9. format?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;post_date&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; effective_date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&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; ***********&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&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; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&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; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Mirisage&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 12:39:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-decide-the-length-of-a-variable-at-once-without-trail-and/m-p/79973#M23008</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2012-08-01T12:39:30Z</dc:date>
    </item>
  </channel>
</rss>

