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 |
What is sqlca?
How to resolve -502 sql code in DB2?
quary for 1> fetch last record 2> fetch in reverse order 3> fetch last 5 row 4> fetch second last record (their is no primary key) i think concept of count can be use for this in 4th
How to retrieve rows from a db2 table in embedded sql?
Once you create a view, where would information about the view be stored?
what's the equivalent Cobol Data type for Decimal(x,y) in DB2? what does the current SQLID register contain?
3 Answers Cap Gemini, Tech Mahindra,
What is the physical storage length of date data type?
How does a cursor work?
insert into tablename a column1, column2 select column1, column2 from tablename b i am getting abend -104..can any one help?
Is it Possible to declare or create a cursor for UPDATE of table? If yes tell me how? If no Tell me why?
Is Cursor exicutable ?
What is commit in db2?