title: Sybase bcp: Unexpected EOF encountered in BCP data-file
body: <p>I've got a couple of issues with bcp.
  I'm trying to load data from a text file to Sybase ASE 16.0 . The DB is on my local machine (Win 7 64-bit).
  I'm using this command:</p>
  
  <p><code>bcp dbname.owner.TO_INTS in "SomeInts.txt" -P password -S server -U sa  -f "bcp_tblTO_INTS.fmt" -e "bcp.errlog.txt"</code></p>
  
  <p>Here is the format file ("bcp_tblTO_INTS.fmt"):</p>
  
  <p><code>10.0
  1
  1 SYBINT4 0 5 "" 1 SEEMS_THIS_IS_IGNORED
  </code></p>
  
  <p>The target table has a single column, defined as an INT:
  <code>CREATE TABLE owner.TO_INTS
    (
    FROM_INT INT NOT NULL
    )
    LOCK ALLPAGES
    ON 'default'
  GO
  </code></p>
  
  <p>I have two problems.</p>
  
  <ol>
  <li>bcp will only populate the target table if the data has just four characters in it (ie, values from 1000 to 9999). If I use values outside this range I get:</li>
  </ol>
  
  <p><code>Unexpected EOF encountered in BCP data-file.
  bcp copy in failed</code></p>
  
  <ol start="2">
  <li>The values are not being populated correctly:</li>
  </ol>
  
  <p>Input value (in file) :  1000            Populated as (in Sybase):808464433</p>
  
  <p>Input value (in file) :  9999            Populated as (in Sybase):960051513</p>
  
  <p>The file encoding is ANSI. The EOL character is LF.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks
  Dave.</p>