<?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 convert dataset size bytes into MB in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/convert-dataset-size-bytes-into-MB/m-p/448059#M112661</link>
    <description>&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table size as&lt;/P&gt;&lt;P&gt;select*from dictionary.tables&lt;/P&gt;&lt;P&gt;where libname="SASHELP";&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;picture dd low - high="999999MB";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data data;&lt;/P&gt;&lt;P&gt;set size;&lt;/P&gt;&lt;P&gt;size=filesize*(1024*1024);&lt;/P&gt;&lt;P&gt;keep memname filesize size;&lt;/P&gt;&lt;P&gt;format size dd.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;check out the above program....is it right ?&lt;/P&gt;&lt;P&gt;if it is right ...i am not getting accurate result.....&lt;/P&gt;&lt;P&gt;please help by modifying the program.....give the best suggetions....&lt;/P&gt;&lt;P&gt;thank you inadvance.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Mar 2018 06:30:11 GMT</pubDate>
    <dc:creator>raj143</dc:creator>
    <dc:date>2018-03-23T06:30:11Z</dc:date>
    <item>
      <title>convert dataset size bytes into MB</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-dataset-size-bytes-into-MB/m-p/448059#M112661</link>
      <description>&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table size as&lt;/P&gt;&lt;P&gt;select*from dictionary.tables&lt;/P&gt;&lt;P&gt;where libname="SASHELP";&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;picture dd low - high="999999MB";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data data;&lt;/P&gt;&lt;P&gt;set size;&lt;/P&gt;&lt;P&gt;size=filesize*(1024*1024);&lt;/P&gt;&lt;P&gt;keep memname filesize size;&lt;/P&gt;&lt;P&gt;format size dd.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;check out the above program....is it right ?&lt;/P&gt;&lt;P&gt;if it is right ...i am not getting accurate result.....&lt;/P&gt;&lt;P&gt;please help by modifying the program.....give the best suggetions....&lt;/P&gt;&lt;P&gt;thank you inadvance.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 06:30:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-dataset-size-bytes-into-MB/m-p/448059#M112661</guid>
      <dc:creator>raj143</dc:creator>
      <dc:date>2018-03-23T06:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: convert dataset size bytes into MB</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-dataset-size-bytes-into-MB/m-p/448062#M112663</link>
      <description>&lt;P&gt;Change to this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;size = filesize / 1024 / 1024;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Filesize contains the number of bytes. Dividing by 1024 gives you KB, dividing again gives you MB.&lt;/P&gt;
&lt;P&gt;One more divsion would give you GB.&lt;/P&gt;
&lt;P&gt;You could even use a multiplicator in the format and assign the format directly to filesize.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 06:47:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-dataset-size-bytes-into-MB/m-p/448062#M112663</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-23T06:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: convert dataset size bytes into MB</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-dataset-size-bytes-into-MB/m-p/448064#M112664</link>
      <description>&lt;P&gt;Some things helping us to help you:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;use {i} or running-man icon to post &lt;STRONG&gt;formatted&lt;/STRONG&gt; code, this increases readability&lt;/LI&gt;
&lt;LI&gt;explain the expected result&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The SAS environment i have access to prints the following error message:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;40         
41         data data;
                ____
                57
ERROR 57-185: DATA is not allowed in the DATA statement when option DATASTMTCHK=ALLKEYWORDS.  Check for a missing semicolon in the 
              DATA statement, or use DATASTMTCHK=NONE.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;After renaming the dataset the numbers seem to be to high. Maybe using the standard format sizekmgw.d is what you need.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 06:57:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-dataset-size-bytes-into-MB/m-p/448064#M112664</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-03-23T06:57:00Z</dc:date>
    </item>
  </channel>
</rss>

