<div dir="ltr"><div>That&#39;s exactly what it was....it needed the &#39;close cli&#39; statement.......ugh...I always forget that ha</div><div>thanks guys</div><div> </div><div>Scott</div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Thu, Jun 13, 2013 at 3:28 PM, Jeff Harrison <span dir="ltr">&lt;<a href="mailto:jeffaharrison@yahoo.com" target="_blank">jeffaharrison@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt;________________________________<br>
&gt; From: Jean-Pierre A. Radley &lt;<a href="mailto:appl@jpr.com">appl@jpr.com</a>&gt;<br>
&gt;To: FilePro Mailing List &lt;<a href="mailto:filepro-list@lists.celestial.com">filepro-list@lists.celestial.com</a>&gt;<br>
&gt;Sent: Thursday, June 13, 2013 2:13 PM<br>
&gt;Subject: Re: export then email doesn&#39;t send whole file<br>
<div><div class="h5">&gt;<br>
&gt;<br>
&gt;<a href="mailto:scooter6@gmail.com">scooter6@gmail.com</a> propounded (on Wed, Jun 12, 2013 at 12:02:53PM -0400):<br>
&gt;| I have an export where our marketing people can set select whatever<br>
&gt;| criteria they want<br>
&gt;| It then asks them for the name of the file to output to csv....and their<br>
&gt;| name to email it<br>
&gt;|<br>
&gt;| it runs    /fp/rreport client -f exportCLI -u -x<br>
&gt;|<br>
&gt;| and runs the following process:<br>
&gt;|<br>
&gt;| top:aa=&quot;&quot;<br>
&gt;| :input aa(20,*) &quot;What do you want to name the file? (i.e. flclients.csv<br>
&gt;| )&quot;<br>
&gt;| :ba=&quot;&quot;<br>
&gt;| :input ba(5,*) &quot;Who are you? (i.e. Kalan, Jim)&quot;:<br>
&gt;| :aa=&quot;&quot; or ba=&quot;&quot;<br>
&gt;| :goto top:<br>
&gt;| ::ab(44,*)=&quot;/appl/fpmerge/cliexport/&quot;{aa:<br>
&gt;| ::export ascii cli=(ab) r=\n f=, o=&quot; c=&quot;:<br>
&gt;| ::cli(1)=1;cli(2)=2;cli(3)=3;cli(4)=4;cli(5)=5;cli(6)=6;cli(7)=7;cli(8)=8:<br>
&gt;| ::cli(9)=17-&quot;1&quot;;cli(10)=67;cli(11)=75;cli(12)=77;:<br>
&gt;| ::ac(4,.0)=@td-67:<br>
&gt;| ::cli(13)=ac:<br>
&gt;| ::x(10,.0,g)=x+&quot;1&quot;:<br>
&gt;| ::end:<br>
&gt;| @done::beep;msgbox &quot;A total of&quot;&lt;x&lt;&quot;Records were selected...Press Enter&quot;:<br>
&gt;| ::system &quot;/appl/fpmerge/cliexport/send_file.scr&quot;&lt;aa&lt;ba:<br>
&gt;|<br>
&gt;| So as you can see, using the parameters the user enters, it calls the<br>
&gt;| send_file script which basically is just using mutt to send the file..<br>
&gt;| The problem is, once the csv files arrives in the users Inbox, it rarely<br>
&gt;| has all the records in it (every now and then it does, but typically gets<br>
&gt;| cut off somewhere)<br>
&gt;| However, if I go look in the directory where the file gets created, all of<br>
&gt;| the records are there<br>
&gt;| If I send the file from the command line using mutt just like my script<br>
&gt;| does, then the file will arrive fully intact with all the records?<br>
&gt;|<br>
&gt;| I even put a sleep command  (sleep 10) in the beginning of my script - just<br>
&gt;| in case the file hadn&#39;t been written out completely, but that didn&#39;t change<br>
&gt;| anything....<br>
&gt;|<br>
&gt;| What would cause this behaviour?  It&#39;s as if the email trigger gets called<br>
&gt;| prior to the entire file being &#39;written to disk&#39; or something?<br>
&gt;|<br>
&gt;| Any insight would be appreciated<br>
&gt;|<br>
&gt;<br>
&gt;What version of mutt are you using, and what mutt command?<br>
&gt;<br>
&gt;--<br>
&gt;JP<br>
<br>
</div></div>Is it possible that the automatic close of the file does not occur until after the @done processing?  It sounds like that is the case.  Try executing a &quot;close cli&quot; as the first thing after @done<br>

<br>
Good luck.<br>
<br>
Jeff Harrison<br>
<a href="mailto:jeffaharrison@yahoo.com">jeffaharrison@yahoo.com</a><br>
<br>
Author of JHExport and JHIMport.<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Filepro-list mailing list<br>
<a href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a><br>
Subscribe/Unsubscribe/Subscription Changes<br>
<a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank">http://mailman.celestial.com/mailman/listinfo/filepro-list</a><br>
</div></div></blockquote></div><br></div>