Convert IBM Zoned-Decimal EBCDIC data to NUMBER format

From: Stephen Pennine <spennine_at_home.com>
Date: Mon, 09 Oct 2000 20:20:49 -0400
Message-ID: <7gn4uso9lrda79lfb430kcrfbvnm6sm4tm_at_4ax.com>


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 Tue Oct 10 2000 - 02:20:49 CEST

Original text of this message