Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Query realted to DB2 data type

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Kiranmayee

New User


Joined: 09 Jan 2008
Posts: 25
Location: India

PostPosted: Tue Mar 11, 2008 11:43 am    Post subject: Query realted to DB2 data type
Reply with quote

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
View user's profile Send private message

Help-Me-Out

New User


Joined: 09 Dec 2006
Posts: 56
Location: Pune

PostPosted: Tue Mar 11, 2008 2:05 pm    Post subject:
Reply with quote

What icon_question.gif Changing in the copybook and will change in the DB. icon_question.gif

Have u understood the DB concepts..plz go through it??
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Tue Mar 11, 2008 5:16 pm    Post subject:
Reply with quote

Do you think you know more than DB2 about what field types correspond to DB2's data types?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Mar 11, 2008 5:38 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Kiranmayee

New User


Joined: 09 Jan 2008
Posts: 25
Location: India

PostPosted: Tue Mar 11, 2008 5:57 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Mar 11, 2008 6:01 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Suresh Ponnusamy

Active User


Joined: 22 Feb 2008
Posts: 107
Location: New York

PostPosted: Tue Mar 11, 2008 6:29 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us