title: ASE ISQL output to file, occassionally is empty or blank
body: <p>Give this unix script, which is scheduled batch run:</p>
  
  <pre><code>isql -U$USR -S$SRVR -P$PWD -w2000 &lt; $SCRIPTS/sample_report.sql &gt; $TEMP_DIR/sample_report.tmp_1
  sed 's/-\{3,\}//g' $TEMP_DIR/sample_report.tmp_1 &gt; $TEMP_DIR/sample_report.htm_1
  uuencode $TEMP_DIR/sample_report.htm_1 sample_report.xls &gt; $TEMP_DIR/sample_report.mail_1
  
  mailx -s "Daily Sample Report" email@example.com &lt; $TEMP_DIR/sample_report.mail_1
  </code></pre>
  
  <p>There are occasionally cases where the sample_report.xls attached in the mail, <strong>is empty, zero lines.</strong></p>
  
  <p>I have ruled out the following:</p>
  
  <ol>
  <li>not command processing timeout - by adding the -t30 to isql, I get the xls and it contains the error, not empty</li>
  <li>not sql error - by forcing an error in the sql, I get the xls and it contains the error, not empty</li>
  <li>not sure of login timeout - by adding -l1, it does not timeout, but I can't specify a number lower than 1 second, so I can't say</li>
  </ol>
  
  <p>I cannot reproduce this, as I do not know the cause. Has anyone else experienced this or have way to address this? Any suggestions how to find the cause? Is it the unix or the Sybase isql?</p>