Re: Convert IBM Zoned-Decimal EBCDIC data to NUMBER format

From: frank <fbortel_at_home.nl>
Date: Sun, 15 Oct 2000 14:33:51 GMT
Message-ID: <39E9C09F.5A9B5674_at_home.nl>


The only way I ever succeeded in that (while using SQL*Loader) was to create the file on the IBM in characters. Just "print" the data Mind the EBCDIC->ASCII conversion that must be done somewhere.

Stephen Pennine wrote:

> We're importing IBM mainframe data to an 8i database via the UTL_FILE
> package. The data is produced on an IBM in COBOL, as zoned-decimal
> (COBOL PICture S9(10)V999). Because this format of data has letters
> in the last byte of the number, which denotes the numbers's sign,
> Oracle doesn't like it.
>
> The TO_NUMBER function works with display numbers (no sign), but not
> with the signed data.
>
> How do we communicate the fact that this data is 'zoned', not dislpay
> to the TO_NUMBER function? None of the NLS_PARAMS I've seen account
> for the 'zone' or 'overpunch' byte that represents both the least
> significant digit, and the sign of the number itself.
>
> Is there a direct way to translate this type of data into an
> understandable form for Oracle?
>
> I could write a procedure to parse the number (replacing the letter
> with the approprate number, and signing the entire number
> accordingly). But there must be a better way.
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
  Received on Sun Oct 15 2000 - 16:33:51 CEST

Original text of this message