title: DB21007E End of file reached while reading the command error
body: <p>I'm trying to execute the below sql file using db2 in the command line. But Im getting the below error. I'm not sure where it went wrong.</p>
  <p>&quot;DB21007E  End of file reached while reading the command&quot;</p>
  <p><strong>I'm executing the below sql file using db2 -tvf sqlfile</strong></p>
  <pre><code>connect to ****** user ***** using ******
  export to &quot;D:\Vikas.csv&quot; OF DEL MESSAGES
  select
  T1.ROW_NUM,
  T5.DETAIL_TYPE_CD,
  T1.ADMIN_FEES_TICKET,
  T1.ADMINISTRATIVE_FEES,
  T1.BASE_RENT,
  T1.CITATIONS,
  T1.COLLECTION_REPO_FEES,
  T1.DESC,
  T1.EFFECTIVE_DATE,
  T1.LATE_CHARGE,
  T1.MISC_FEE,
  T2.STATUS_CD,
  T4.ROW_ID,
  T3.ROW_ID,
  T2.BUILD,
  T1.REVERSE_FLG,
  T1.NSF_FLG,
  T2.PR_CON_ID,
  T1.PROC_DATE,
  T1.PROPERTY_TAX,
  T1.REGISTRATION_FEES,
  T1.REPAIR_FEES,
  T1.SALES_TAX,
  T1.TERMINATION_FEES,
  T1.TOTAL_TRANS,
  T1.TRANSACTION_TYPE
  
  FROM
  SIEBEL.LSE_INPHIST_VIEW T1
  LEFT OUTER JOIN SIEBEL.S_ASSET T2 ON T1.ACCOUNT_NUM = T2.ASSET_NUM
  LEFT OUTER JOIN SIEBEL.S_ASSET_CON T3 ON T2.ROW_ID = T3.ASSET_ID AND
  T3.RELATION_TYPE_CD = 'Obligor'
  LEFT OUTER JOIN SIEBEL.S_ASSETCON_ADDR T4 ON T3.ROW_ID = T4.ASSET_CON_ID 
  AND T4.USE_TYPE_CD = 
  'Bill To'
  LEFT OUTER JOIN SIEBEL.S_PROD_INT T5 ON T2.PROD_ID = T5.ROW_ID
  WHERE
  (T1.ACNT_ID = '01003501435')
  ORDER BY
  T1.ACNT_ID DESC,T1.PROC_DATE DESC WITH UR
  </code></pre>
  <p>Now I'm able to connect the DB2 but while executing the select statement it's throwing the below error</p>
  <pre><code>SQL0104N  An unexpected token &quot;T1.ROW_NUM&quot; was found following &quot;SELECT&quot;.
  Expected tokens may include:  &quot;SELECT&quot;.  SQLSTATE=42601
  </code></pre>