<?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: checking file size and send email in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147122#M11596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my file name is AB.WOOLAWSON.USWOO.DAT and this would be around .5 gb. sometimes it come with .2 gb which is much smaller and wants to create email alerts to users....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jan 2014 22:35:17 GMT</pubDate>
    <dc:creator>woo</dc:creator>
    <dc:date>2014-01-21T22:35:17Z</dc:date>
    <item>
      <title>checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147115#M11589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends - i am not sure if this question appropriate in this pan or not but i wants to raise this issue i have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have one file coming from different stream and we use that file to process in SAS. this file has .dat extension. Sometime this file coming in with very small size and i want to know if we have a way in SAS to check file size and send out email to users...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using windows 2003/SAS 9.1/EG 4.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 17:33:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147115#M11589</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2014-01-20T17:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147116#M11590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use system commands to check a file size and you can email users if something is wrong. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have x commands enabled in your environment?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both of these questions have answers in the forum already. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 17:35:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147116#M11590</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-01-20T17:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147117#M11591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Reeza!&lt;/P&gt;&lt;P&gt;no, x command is not enable yet. I am in process with admin to make it enable and waiting for same. I am assuming we have to edit objectspawner.bat file with&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - allowxcmd command. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but what is alternative if admin answer is no. can we still do samething?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 17:57:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147117#M11591</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2014-01-20T17:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147118#M11592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I'm not sure you need x commands, just the pipe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it and let me know &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following all get filename but the dir statement can be modified to obtain size as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/1409543/using-sas-macro-to-pipe-a-list-of-filenames-from-a-windows-directory" title="http://stackoverflow.com/questions/1409543/using-sas-macro-to-pipe-a-list-of-filenames-from-a-windows-directory"&gt;Using SAS Macro to pipe a list of filenames from a Windows directory - Stack Overflow&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.amadeus.co.uk/sas-technical-services/tips-and-techniques/general/reading-a-file-list-into-a-data-set/" title="http://www.amadeus.co.uk/sas-technical-services/tips-and-techniques/general/reading-a-file-list-into-a-data-set/"&gt;http://www.amadeus.co.uk/sas-technical-services/tips-and-techniques/general/reading-a-file-list-into-a-data-set/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings11/179-2011.pdf" title="http://support.sas.com/resources/papers/proceedings11/179-2011.pdf"&gt;http://support.sas.com/resources/papers/proceedings11/179-2011.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 18:14:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147118#M11592</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-01-20T18:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147119#M11593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If do not have the xcmd you also do not have the pipe command. That wil bring you no solution.&lt;/P&gt;&lt;P&gt;SAS 9.1.3 is becoming outdated the documentation at the SAS site is starting to dissapear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use wildcards (*?) in filenames and create a list of your needed files in that way. &lt;A href="http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#chfnoptfmain.htm" title="http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#chfnoptfmain.htm"&gt;SAS(R) 9.3 Companion for Windows&lt;/A&gt; (filename)&lt;/P&gt;&lt;P&gt;You will need&amp;nbsp; the filevar option of the infile statement. Hmmm not finding any example I did those tricks a long time ago. Should&lt;/P&gt;&lt;P&gt; come up with an example. &lt;/P&gt;&lt;P&gt;Having the real filenames you can try the finfo fucntion (is there in 9.1.3 I believe) &lt;A href="http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#n0vegoaf5t6s31n1wu1qok4swqye.htm" title="http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#n0vegoaf5t6s31n1wu1qok4swqye.htm"&gt;SAS(R) 9.3 Companion for Windows&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 20:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147119#M11593</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-01-20T20:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147120#M11594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this piece of code from the SAS doc'n....it works for me.&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data info;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; length infoname infoval $60;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; drop rc fid infonum i close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; rc=filename('abc', '&lt;SPAN class="xis-userSuppliedValue"&gt;physical-filename&lt;/SPAN&gt;');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; fid=fopen('abc');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infonum=foptnum(fid);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do i=1 to infonum;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoname=foptname(fid, i);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoval=finfo(fid, infoname);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; close=fclose(fid);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 22:58:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147120#M11594</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-01-20T22:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147121#M11595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all for your information....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Tom for posting real code but when i put my values in your code without changing anything i am getting error like, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"invalid do loop control information, either initial or to expression is missing or the by expression is missing, zero or invalid"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 06:11:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147121#M11595</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2014-01-21T06:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147122#M11596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my file name is AB.WOOLAWSON.USWOO.DAT and this would be around .5 gb. sometimes it come with .2 gb which is much smaller and wants to create email alerts to users....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 22:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147122#M11596</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2014-01-21T22:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147123#M11597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's odd, it works for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code with a couple of 'put' statements added for logging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run it I see in the log:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rc=0&lt;/P&gt;&lt;P&gt;fid=1&lt;/P&gt;&lt;P&gt;infonum=6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data info;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; length infoname infoval $60;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; drop rc fid infonum i close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; rc=filename('abc', 'physical-filename');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; put rc =;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; fid=fopen('abc');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; put fid=;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infonum=foptnum(fid);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; put infonum=;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do i=1 to infonum;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoname=foptname(fid, i);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoval=finfo(fid, infoname);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; close=fclose(fid);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 01:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147123#M11597</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-01-22T01:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147124#M11598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try using a filename statement to point to the file you want to check, then use the SASHELP.VEXTFL dictionary table to extract the size information;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename myfile 'D:\myfile.dat';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.vextfl;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if fileref = "MYFILE" then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; size_in_gb = (filesize / (1024**3));&lt;/P&gt;&lt;P&gt;&amp;nbsp; put size_in_gb=;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 13:30:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147124#M11598</guid>
      <dc:creator>HJD24</dc:creator>
      <dc:date>2014-01-22T13:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147125#M11599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom and HJD24.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;meanwhile i have used different approch,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i used proc export to get file in SAS and then used &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;%sysfunc (open)/attrn/close options to get record and then email logic to send an email...this works fine for me...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 17:17:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147125#M11599</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2014-01-22T17:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: checking file size and send email</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147126#M11600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;- HJD24 - in your code - filesize variable is uninitialized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 17:19:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/checking-file-size-and-send-email/m-p/147126#M11600</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2014-01-22T17:19:53Z</dc:date>
    </item>
  </channel>
</rss>

