View previous topic :: View next topic |
Author |
Message |
Seshagiri Beginner
Joined: 23 Nov 2004 Posts: 3 Topics: 3 Location: mumbai
|
Posted: Wed Mar 23, 2005 10:19 am Post subject: Load data into table |
|
|
HI
I have data 0000000000000000(16 zeros) in flat file record,want to
srote this data in DB2 table with 2 decimal places(14 zeros.2 zeros).
For this I definied S9(14)V9(2) and moved this into S9(13)V9(2) comp-3.
and loaded this comp-3 value in to Decimal(15,2).Is it correct?I assumed
data in flat file as numaric data.
Please suggest me.
Regards,
Seshagiri. _________________ I aggre all the terms and conditions of this site. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Mar 23, 2005 12:01 pm Post subject: |
|
|
Seshagiri,
A DB2 column defined as DECIMAL(15,2) will have a total of 15 digits including the digits following the decimal point. So you only have 13 digits and 2 decimal digits. If your intention is to store 14 digits and 2 decimal digits , you should define your DB2 column as DECIMAL(16,2) which has an cobol equivalent of PIC S9(14)V9(2) COMP-3.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|