Can you tell me how to export a table to a text file in ebcdic character set and numeric columns in comp-3 format?
Oracle will export in the character set given by user's session environment variable NLS_LANG. But the problem is, if your nls_lang is not the same or superset of the database character set, you will or may lose certains types of characters. So, the answer is to check the NLS_LANG variable and make sure the character sets in use by your session and by the database are related. If not, change the NLS_LANG variable for your session.
See the Oracle Utilities Guide for more information.
I don't specifically know if export/import can handle comp-3 but I can't find anything to confirm that it does, so I'd say that it does not. I do know you can write a Pro*Cobol program and pass data from a number column to an indicator variable of type comp-3. Using a Pro*Cobol program may be an alternative way to write your own export/import.
For More Information
- Dozens more answers to tough Oracle questions from Karen Morton are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.