GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: UCS-2 SQL-LOADER ASCII
Operating System - HP-UX
1847703
Members
5673
Online
110265
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2005 10:35 AM
04-05-2005 10:35 AM
UCS-2 SQL-LOADER ASCII
Hi,
The current set up of a process is like this. Source is a zip file that contains 4 flat files which are actual data of 4 corresponding tables while there is another meta data flat file that tells the number of lines in the flat file and its structure. Using shell we ftp it from the remote server to local and using the metadata file we create ctl files and use sqlldr utility to load in to the oracle tables.
Before loading we do cross check if the number of rows mentioned in the meta data matches with the actual number of rows in the individual flat files. WC command is used to get the number of rows from the individual flat files.
The meta data file and the data file were ASCII files till now. So WC returned correct number of lines and it matched with the meta data so the process continued to the next step. But now the file type as changed. The data files are no more ASCII files but UCS-2 (Some of the countires character set are not supported by ASCII and hence the vendor has decided to supply the data in UCS-2 format). So when we do a line count it gives the double the number of the actual number of lines in the flat file. (UCS files are 2bytes per character while ASCII are 1byte per character)
$ wc -l *
3978 DE_GEOGRAPHY_GEO_200502_33360_2.TXT (Dimension Geography Flat file)
48 DE_PERIOD_PER_200502_33360_2.TXT (Dimension Period Flat file)
1442 DE_PRODUCT_PRO_200502_33360_2.TXT (Dimension Product Flat file)
See below info in metadata..
No of lines
--------------
721,
1989
24
$ more SYS_CONTROL_TABLE.TXT (Meta data flat file)
"DE","DIM","200502",721,"PSO","PRODUCT","MNTH","DE_PRODUCT_PRO_200502_33360_2.TXT","PRO",2005-03-10
"DE","DIM","200502",1989,"PSO","GEOGRAPHY","MNTH","DE_GEOGRAPHY_GEO_200502_33360_2.TXT","GEO",2005-03-10
"DE","DIM","200502",24,"PSO","PERIOD","MNTH","DE_PERIOD_PER_200502_33360_2.TXT","PER",2005-03-10
So when the shell compares these two value it fails and so the process aborts. Do you have any idea how to overcome this issue.
Also I believe UCS-2 files cannot be directly loaded thro' SQLLDR utility. I understand we need to convert this file into UTF-8 format using Utility 'RECODE'. Has anybody worked on this earlier. If yes, pls let me know the simplest way to go about.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2005 03:17 AM
04-06-2005 03:17 AM
Re: UCS-2 SQL-LOADER ASCII
any help ?
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP