Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


A Table feild is declared as Decimal(7,2). I want to insert
the decimal in to this column thru cobol-db2 program.
How should I declare my local input file variable
or any suggestion?

Answers were Sorted based on User's Feedback



A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cob..

Answer / rajesh

u can declare in application program(cobol)
01 dec pic 9(5)v9(2) comp-3. is equal to dec(7,2)

Is This Answer Correct ?    16 Yes 4 No

A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cob..

Answer / prabhakar

u can declare in application program(cobol)
01 dec pic 9(5).9(2). is equal to dec(7,2)

Is This Answer Correct ?    11 Yes 5 No

A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cob..

Answer / sumanth toom

hmmm..depends how you want to use that variable.
9(5).99 is an edited field. Probably used for printing or
reporting purposes.

Otherewise, 9(5)V99 can be used.

Is This Answer Correct ?    5 Yes 1 No

A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cob..

Answer / nitin

Hello Sumanath and Rajesh

No declaring 9(5)V99 / 9(5)v9(2) comp-3 this way was
not working. I tried this also.

For Example: if the input is 123.45 from flat file
and 1. If I declare 01 W-var pic 9(5)V99
then value of W-var will be 123 45 (It assumed space at
place of decimal) and the same value 123 45 it tried to
moved in the db2 table host varible. which in turn throw
SOC7.

Is This Answer Correct ?    2 Yes 1 No

A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cob..

Answer / nitin

Thanks... Prabhakar
This works

Is This Answer Correct ?    2 Yes 2 No

A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cob..

Answer / baalu

hello, nitin...
try this one s9(7-2)v9(2)comp-3
this is similor to s9(x-y)v9(y) comp-3



with best regards,
baalu.

Is This Answer Correct ?    1 Yes 1 No

A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cob..

Answer / mf_nerd

PIC S9(5)V99 COMP-3.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More DB2 Interview Questions

Explain about rct.

0 Answers  


What is lock contention?

1 Answers  


What are the various isolation levels possible?

0 Answers  


I have some 3 particular fields ..i want to know which all tables have those 3 fields. Is there any way to identify.. can we know by quering system tables..

5 Answers   CTS,


How many clustering indexes can be defined for a table?

2 Answers  


I have 1000 rows in a db2 table.I want to update first 100 records,How do I do it?

4 Answers   CTS,


What is meant by AUTO COMMIT?

3 Answers  


before altering a table is it necessary to lock ? if lock what is it ? how to do ? ifi want to lock a table what is that command ?

0 Answers   IBM,


How do I import data from excel to db2?

0 Answers  


What is dbrm library?

0 Answers  


What is with ur in db2?

0 Answers  


How many buffer pools are available in db2?

2 Answers  


Categories