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
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 |
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 |
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 |
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 |
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
What does DML stand for and what are some examples of it?
Mention the length of physical storage of the given data types of db2 – date, timestamp, time
What are the different types of base tables?
Update command
Can we update view in db2?
What is view db2?
What is release/acquire in bind?
On which levels locks can be applied?
How do I create a table MANAGER (EMP-NO, MANAGER) where MANAGER is a foreign key which references to EMP-NO in the same table? Give the exact DDL.
How does one bind 2 versions of a CICS transaction with the same module name in two different CICS regions that share the same DB2 subsystem?
What is database manager in db2?