If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Please advice on extracting to a UTF-8 file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-23-10, 03:02
Cosec Cosec is offline
Registered User
 
Join Date: Aug 2008
Posts: 5
Please advice on extracting to a UTF-8 file

I use the following statement to extract from DB to a text file(ascii format):

db2 -x -tf ${TMP_SCRIPT_NAME} -r ${OUTPUT_FILE_DIR}/${OUTPUT_FILE_NAME}.${OUTPUT_FILE_EXT} > /dev/null 2>&1

Are there any options that I could use on the above statament to be able to extract the data to a text file (UTF-8) format ?

Please advice. Thank.s
Reply With Quote
  #2 (permalink)  
Old 06-23-10, 06:26
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555

Last edited by dr_te_z; 06-23-10 at 06:28. Reason: edit url's
Reply With Quote
  #3 (permalink)  
Old 06-23-10, 09:01
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
If your database is in UTF-8, you can use the "codepage=1208" modifier in the EXPORT command.
Reply With Quote
  #4 (permalink)  
Old 06-30-10, 00:06
Cosec Cosec is offline
Registered User
 
Join Date: Aug 2008
Posts: 5
The source database is not UTF-8. Is there any possibility to modify the statement mentioned earlier to achieve the output in UTF-8 format ?
Reply With Quote
  #5 (permalink)  
Old 06-30-10, 05:14
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
As Nick already said, you can use the EXPORT command and the "codepage" modifier.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On