View previous topic :: View next topic
|
Author |
Message |
Kiranmayee
New User
Joined: 09 Jan 2008 Posts: 25 Location: India
|
|
|
|
Hi,
I am working on DB2 V7.
I created a table with field Num1 of type INT and i generated copy book for this table. In copy book, for filed Num1 it is S9(9) comp.
But i need s9(10). Can i update only copy book from s9(9) comp to s9(10) comp? Will it effect storing of values in Database?
What is equivalent type in DB2 V7 for s9(10) comp (or) s9(11) comp. |
|
Back to top |
|
|
Help-Me-Out
New User
Joined: 09 Dec 2006 Posts: 56 Location: Pune
|
|
|
|
What Changing in the copybook and will change in the DB.
Have u understood the DB concepts..plz go through it?? |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Do you think you know more than DB2 about what field types correspond to DB2's data types? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
The range of large integers is -2147483648 to +2147483647. If your COBOL programs can handle the full range will depend on the version of cobol and your compile options. If you change the picture to s9(10) you will have problems with DB2! |
|
Back to top |
|
|
Kiranmayee
New User
Joined: 09 Jan 2008 Posts: 25 Location: India
|
|
|
|
Hi,
i think no one understood my query. i wil be more clear now.
I am having a situation in which my DB2 table filed type is INT and its corresponding copy book field is S9(9) comp. Means i can store value upto 2147483647 i.e 10 digits. But now i want to store value upto 11 digits.
In DB2 V9 BIGINT data type is there but it is not there in DB V7.
So how i can store value upto 11 digits in DB2 V7? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Kiranmayee wrote: |
Hi,
i think no one understood my query. i wil be more clear now.
I am having a situation in which my DB2 table filed type is INT and its corresponding copy book field is S9(9) comp. Means i can store value upto 2147483647 i.e 10 digits. But now i want to store value upto 11 digits.
In DB2 V9 BIGINT data type is there but it is not there in DB V7.
So how i can store value upto 11 digits in DB2 V7? |
No one understood you question because you didn't ask about storing 11 digits! DB2 v7 does have the option for an 11 digit integer! You could define it as dec(11,0). |
|
Back to top |
|
|
Suresh Ponnusamy
Active User
Joined: 22 Feb 2008 Posts: 107 Location: New York
|
|
|
|
We cannot store 11 bytes in an Integer variable. In this case you have to define the database column as Decimal which can hold up to 18 bytes but occupy only 10 bytes of memory.
The DCLGEN variable for the Decimal column will be S9(18) Comp-3. |
|
Back to top |
|
|
|