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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by rollback?

567


What is ibm db2 client?

513


What is the physical storage length of the data types date, time, and timestamp?

595


Can you use max on a char column?

634


What is database alias db2?

593






What is the information associated with sysibm.syslinks table?

651


What is coalesce in db2?

676


How do you concatenate the firstname and lastname from emp table to give a complete name?

595


have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.

1228


What is netezza database?

562


What are the 2 sqlcodes that are returned?

631


How do you select a row using indexes in db2?

637


can all users have the privilage to use the sql statement select * (dml)?

633


Explain package in db2 and its advantages?

589


How many databases can be created inside an instance in db2 ?

590