<?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: leading zeros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590995#M169244</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181538"&gt;@mauri0623&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Opening the .csv file in notepad ++ still shows the leading zeros missing.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you first opened in Excel and then saved it, such as after widening columns to see values then Excel likely "corrupted" the values.&lt;/P&gt;
&lt;P&gt;You did not say that you never opened the file in Excel.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Sep 2019 16:56:31 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-09-23T16:56:31Z</dc:date>
    <item>
      <title>leading zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590929#M169204</link>
      <description>&lt;P&gt;I create a .csv file from a SAS dataset. When I do this I loose the leading zeros on columns IPAC where the IPAC starts with 0000 and then the number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example, 00003801 will becomes 3801 and I loose the first 4 zeros. Any ideas how to see the leading zeros in the .csv file.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 14:20:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590929#M169204</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2019-09-23T14:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: leading zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590937#M169210</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181538"&gt;@mauri0623&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you opening the .csv with a text editor or with Excel?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Excel will read the string as a number and omit the leading zeroes. Excel doesn't really show you what's in the .csv but it will interpret the values in the .csv and convert it to Excel.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the zeroes are already missing in the .csv text file itself (opened with a text editor like Notepad) then use a Zn. format for writing the numbers.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 14:31:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590937#M169210</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-23T14:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: leading zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590945#M169217</link>
      <description>&lt;P&gt;Opening the .csv file in notepad ++ still shows the leading zeros missing.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 14:41:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590945#M169217</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2019-09-23T14:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: leading zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590947#M169218</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;IF you are creating output for Excel, you have more choices than creating a CSV file. You have ODS CSV (plain text CSV file with no formatting), ODS TAGSETS.EXCELXP (Spreadsheet XML format 2003) and ODS EXCEL (XLSX format 2007).&lt;BR /&gt;&lt;BR /&gt;If you are running SAS 9.4 then you should try ODS EXCEL. It will create an XLSX file that does respect the Zn. format, as shown in the output example below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lead_zero_ods_excel.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32677iFEE3C596435B89D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="lead_zero_ods_excel.png" alt="lead_zero_ods_excel.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 14:45:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590947#M169218</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-09-23T14:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: leading zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590960#M169227</link>
      <description>&lt;P&gt;I am putting out a .csv file and not an excel file. I found the solution and it work. Basically using options will solve the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;ods&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;_all_&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;close&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; my_csv_file = C:/users/Mauri.Esfandiari/Documents/Missinginfo_to_Validate_&amp;amp;timestamp..csv;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;ods&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;csvall&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;file&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"&amp;amp;my_csv_file."&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;options&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; (prepend_equals=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"yes"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;quote_by_type=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"yes"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;print&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = sas_perm.miss_ipac_odn_acc_0919 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;noobs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;title&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="3"&gt;"Missing IPACs, ODNs, Accounting, and psudo IPACs"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;ods&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;csvall&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;close&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 14:56:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590960#M169227</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2019-09-23T14:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: leading zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590973#M169232</link>
      <description>&lt;P&gt;How does that actually solve the problem?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You seem to have just added two extra lines above the actual data with a tile and a bunch of unneeded quotes around values that don't actually contain any delimiters that would make the quotes necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 15:45:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590973#M169232</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-09-23T15:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: leading zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590995#M169244</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181538"&gt;@mauri0623&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Opening the .csv file in notepad ++ still shows the leading zeros missing.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you first opened in Excel and then saved it, such as after widening columns to see values then Excel likely "corrupted" the values.&lt;/P&gt;
&lt;P&gt;You did not say that you never opened the file in Excel.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 16:56:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/leading-zeros/m-p/590995#M169244</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-23T16:56:31Z</dc:date>
    </item>
  </channel>
</rss>

