Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2008
    Posts
    6

    Unanswered: 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

  2. #2
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    Last edited by dr_te_z; 06-23-10 at 07:28. Reason: edit url's

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    If your database is in UTF-8, you can use the "codepage=1208" modifier in the EXPORT command.

  4. #4
    Join Date
    Aug 2008
    Posts
    6
    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 ?

  5. #5
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    As Nick already said, you can use the EXPORT command and the "codepage" modifier.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •