Loading from flat files(cobol environment) [message #70401] |
Mon, 10 June 2002 01:26 |
Thomas Silomba
Messages: 2 Registered: June 2002
|
Junior Member |
|
|
Subject: SQL LOADER PROBLEM
HOW DO I LOAD DATA FROM COBOL WITH SIGNED INTEGERS declared as s9(10)v99 into an oracle table. please help me.I have a problem of loading data with negative numbers.
Thomas Silomba
|
|
|
Re: Loading from flat files(cobol environment) [message #71043 is a reply to message #70401] |
Fri, 30 August 2002 02:58 |
Giles Anderson
Messages: 1 Registered: August 2002
|
Junior Member |
|
|
Thomas
The following, which comes from the Oreilly Oracle SQL*Loader - The Definitive Guide, may help;
P71
Table 3-5
DATA COBOL decl. SQL*LDR. decl. Outp. Value
12345 PIC 999V99 ZONED(5,2) 123.45
12345 PIC 99999 ZONED(5) 12345
12345 PIC S99999 ZONED(5) 12345
12345N PIC S999V99 ZONED(5,2) -123.45
It goes on to say;
Trailing signs are always the default (for historic reasons) and they are the only ones supported by SQL*Loader
Full syntax is: -
ZONED(precision[[,scale]])
where: -
precision: - The number of digits in the number; corresponding directly to the total number of characters in the field.
scale: - The number of digits that are assumed to be to the right of the decimal point. Default is 0; which results in integer values being stored.
Another comment later is: -
The one thing you have to be careful about is that ZONED will not correctly interpret "+" & "-". If the data contains positive or negative signs or decimal point you must use one of the external numeric types.
The DECIMAL(precision[[,scale]]) command handles packed decimal (BCD/COMP-3) values
|
|
|