title: DB2 Using LIMIT and OFFSET
body: <p>I am developing a Java Web service allow paging when fetching big data set from a DB2 Database on a IBM Mid Range Machine (AS400).  </p>
  
  <p>For example; if there are 10000 records in a data set, I want to fetch them in 1000 blocks at a time.</p>
  
  <p>I found this <a href="https://www.ibm.com/developerworks/community/blogs/SQLTips4DB2LUW/entry/limit_offset?lang=en" rel="noreferrer">article</a> that explains that I can use LIMIT, and OFFSET.  But I need to set the <code>DB2_COMPATIBILITY_VECTOR</code> variable to <code>MYS</code>.</p>
  
  <p>Now I have been googling and saw you can use the <code>db2set</code> to set this variable.  But I have not been able to find out where to type this command in?</p>
  
  <p>I am developing on a windows machine, and I have the iSeries installed, and I have access to the IBM Mid Range Machine via the iSeries 5250 emulator.</p>
  
  <p>I know this must be a real noob question, but How do I go about changing <code>DB2_COMPATIBILITY_VECTOR</code> variable to <code>MYS</code>?</p>