<?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: Proc report file size in GBs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696162#M212594</link>
    <description>&lt;P&gt;I played around with the format to make it look a little better:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
picture sizes
  0-10240 = "00,009"
  10240-10485760 = "00,009.00K" (mult=0.09765625)
  10485761 - 10737418240 = "00,009.00M" (mult=9.5367431640625E-5)
  10737418241 - 10995116277760 = "00,009.00G" (mult=9.3132257461548E-8)
  10995116277761 - high = "0,000,009.00T" (mult=9.0949470177292E-11)
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 03 Nov 2020 12:03:41 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-11-03T12:03:41Z</dc:date>
    <item>
      <title>Proc report file size in GBs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696146#M212580</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;we have coulm called size and that is defined by byites but we need to convert that varaible into GBs/TBs. and total size of all files.&lt;/P&gt;
&lt;P&gt;can you advice on this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=test nofs; 
 title1 "Simple Report";
 column FILE  SIZE ; 
 define FILE / display;
 define SIZE / analysis sum; 
 rbreak after /  summarize;
 compute SIZE;
size=size/1024;
 endcomp;
 run; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 10:56:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696146#M212580</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2020-11-03T10:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report file size in GBs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696150#M212583</link>
      <description>&lt;P&gt;Please tell us what is not working properly with the code you show.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 11:05:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696150#M212583</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-03T11:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report file size in GBs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696158#M212590</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;sorry I was not crear.&lt;/P&gt;
&lt;P&gt;size column is in bytes so we want to convert that into GBs/Tbs&lt;/P&gt;
&lt;P&gt;ex:sample data in bytes.&lt;/P&gt;
&lt;P&gt;need an output like below as bytes will be caliclated like size=(((size)/1024)/1024) to get in&amp;nbsp; GBs&lt;/P&gt;
&lt;DIV style="padding-bottom: 8px; padding-top: 1px;"&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="128" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl64" style="height: 15.0pt; width: 48pt;"&gt;
&lt;DIV style="padding-bottom: 8px; padding-top: 1px;"&gt;
&lt;DIV style="padding-bottom: 8px; padding-top: 1px;"&gt;file&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="width: 48pt;"&gt;size(in GBs)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD width="64" height="21" class="xl66" style="height: 15.75pt; width: 48pt;"&gt;aa&lt;/TD&gt;
&lt;TD align="right"&gt;0.000977&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD width="64" height="21" class="xl66" style="height: 15.75pt; width: 48pt;"&gt;bb&lt;/TD&gt;
&lt;TD align="right"&gt;0.00193&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD width="64" height="21" class="xl66" style="height: 15.75pt; width: 48pt;"&gt;cc&lt;/TD&gt;
&lt;TD align="right"&gt;0.001812&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD width="64" height="21" class="xl66" style="height: 15.75pt; width: 48pt;"&gt;ff&lt;/TD&gt;
&lt;TD align="right"&gt;1.3125&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD width="64" height="21" class="xl66" style="height: 15.75pt; width: 48pt;"&gt;hh&lt;/TD&gt;
&lt;TD align="right"&gt;20.8125&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl67" style="height: 15.0pt; width: 48pt;"&gt;total&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;P&gt;22.12972&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
infile cards;
input file $ size;
cards;
aa 1024
bb 2024
cc 1900
ff 1376256
hh 21823488
;
run;



proc report data=test nofs; 
 title1 "Simple Report";
 column FILE  SIZE ; 
 define FILE / display;
 define SIZE / analysis sum; 
 rbreak after /  summarize;
 compute SIZE;
size=size/1024;
 endcomp;
 run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 11:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696158#M212590</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2020-11-03T11:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report file size in GBs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696160#M212592</link>
      <description>&lt;P&gt;Use an adaptive format:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input file $ size;
datalines;
A 2000
B 20000
C 200000
D 2000000
E 20000000
F 200000000
G 2000000000
H 20000000000
I 200000000000
J 2000000000000
K 20000000000000
;

proc format;
picture sizes
  0-10240 = "00009"
  10240-10485760 = "00009K" (mult=0.0009765625)
  10485761 - 10737418240 = "00009M" (mult=9.5367431640625E-7)
  10737418241 - 10995116277760 = "00009G" (mult=9.3132257461548E-10)
  10995116277761 - high = "0000009T" (mult=9.0949470177292E-13)
;
run;

proc report data=test nofs; 
 title1 "Simple Report";
 column FILE  SIZE ; 
 define FILE / display;
 define SIZE / analysis sum format=sizes.; 
 rbreak after /  summarize;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can tweak the cutoff values, and the picture to include digits after the decimal point.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 11:32:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696160#M212592</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-03T11:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report file size in GBs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696161#M212593</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/93352"&gt;@sathya66&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;sorry I was not crear.&lt;/P&gt;
&lt;P&gt;size column is in bytes so we want to convert that into GBs/Tbs&lt;/P&gt;
&lt;P&gt;ex:sample data in bytes.&lt;/P&gt;
&lt;P&gt;need an output like below as bytes will be caliclated like size=(((size)/1024)/1024) to get in&amp;nbsp; GBs&lt;/P&gt;
&lt;DIV style="padding-bottom: 8px; padding-top: 1px;"&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="128" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl64" style="height: 15.0pt; width: 48pt;"&gt;
&lt;DIV style="padding-bottom: 8px; padding-top: 1px;"&gt;
&lt;DIV style="padding-bottom: 8px; padding-top: 1px;"&gt;file&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="width: 48pt;"&gt;size(in GBs)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD width="64" height="21" class="xl66" style="height: 15.75pt; width: 48pt;"&gt;aa&lt;/TD&gt;
&lt;TD align="right"&gt;0.000977&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD width="64" height="21" class="xl66" style="height: 15.75pt; width: 48pt;"&gt;bb&lt;/TD&gt;
&lt;TD align="right"&gt;0.00193&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD width="64" height="21" class="xl66" style="height: 15.75pt; width: 48pt;"&gt;cc&lt;/TD&gt;
&lt;TD align="right"&gt;0.001812&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD width="64" height="21" class="xl66" style="height: 15.75pt; width: 48pt;"&gt;ff&lt;/TD&gt;
&lt;TD align="right"&gt;1.3125&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD width="64" height="21" class="xl66" style="height: 15.75pt; width: 48pt;"&gt;hh&lt;/TD&gt;
&lt;TD align="right"&gt;20.8125&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl67" style="height: 15.0pt; width: 48pt;"&gt;total&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;P&gt;22.12972&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It's still not clear to me. You haven't told me what is wrong with the program or the output you get from the program, other than the very obvious you want a different formula for SIZE in the compute block, and you state above the correct formula.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 11:52:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696161#M212593</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-03T11:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report file size in GBs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696162#M212594</link>
      <description>&lt;P&gt;I played around with the format to make it look a little better:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
picture sizes
  0-10240 = "00,009"
  10240-10485760 = "00,009.00K" (mult=0.09765625)
  10485761 - 10737418240 = "00,009.00M" (mult=9.5367431640625E-5)
  10737418241 - 10995116277760 = "00,009.00G" (mult=9.3132257461548E-8)
  10995116277761 - high = "0,000,009.00T" (mult=9.0949470177292E-11)
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Nov 2020 12:03:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-file-size-in-GBs/m-p/696162#M212594</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-03T12:03:41Z</dc:date>
    </item>
  </channel>
</rss>

