<div dir="ltr"><div>I have an export where our marketing people can set select whatever criteria they want</div><div>It then asks them for the name of the file to output to csv....and their name to email it</div><div> </div>
<div>it runs    /fp/rreport client -f exportCLI -u -x</div><div> </div><div>and runs the following process:</div><div> </div><div>top:aa=&quot;&quot;</div><div>:input aa(20,*) &quot;What do you want to name the file? (i.e. flclients.csv<br>
)&quot;<br>:ba=&quot;&quot;</div><div>:input ba(5,*) &quot;Who are you? (i.e. Kalan, Jim)&quot;:<br>:aa=&quot;&quot; or ba=&quot;&quot;</div><div>:goto top:<br>::ab(44,*)=&quot;/appl/fpmerge/cliexport/&quot;{aa:<br>::export ascii cli=(ab) r=\n f=, o=&quot; c=&quot;:<br>
::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>::cli(9)=17-&quot;1&quot;;cli(10)=67;cli(11)=75;cli(12)=77;:<br>::ac(4,.0)=@td-67:<br>::cli(13)=ac:<br>::x(10,.0,g)=x+&quot;1&quot;:<br>::end:<br>
@done::beep;msgbox &quot;A total of&quot;&lt;x&lt;&quot;Records were selected...Press Enter&quot;:<br>::system &quot;/appl/fpmerge/cliexport/send_file.scr&quot;&lt;aa&lt;ba:<br></div><div> </div><div>So as you can see, using the parameters the user enters, it calls the send_file script which basically is just using mutt to send the file..</div>
<div>The problem is, once the csv files arrives in the users Inbox, it rarely has all the records in it (every now and then it does, but typically gets cut off somewhere)</div><div>However, if I go look in the directory where the file gets created, all of the records are there</div>
<div>If I send the file from the command line using mutt just like my script does, then the file will arrive fully intact with all the records?</div><div> </div><div>I even put a sleep command  (sleep 10) in the beginning of my script - just in case the file hadn&#39;t been written out completely, but that didn&#39;t change anything....</div>
<div> </div><div>What would cause this behaviour?  It&#39;s as if the email trigger gets called prior to the entire file being &#39;written to disk&#39; or something?</div><div> </div><div>Any insight would be appreciated</div>
<div> </div><div>Scott</div><div>PDM</div></div>