MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Load data into table

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Seshagiri
Beginner


Joined: 23 Nov 2004
Posts: 3
Topics: 3
Location: mumbai

PostPosted: Wed Mar 23, 2005 10:19 am    Post subject: Load data into table Reply with quote

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
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Mar 23, 2005 12:01 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group