Assuming that you are not trying to get Essbase to talk directly to DB2 (in which case you need to discuss this with Essbase), you would need to explain what format that you want the data from DB2. Generally, you can use the export command. Here is how to export with comma delimited format:
export to EMPLOYEE.DEL of DEL select * from EMPLOYEE
See the DB2 Command Reference Manual for more information and options on the DB2 export command.