There is a variable with value 19446. Requirement is to
convert it to 194.46. I tried it by doing divide by 100 and
my receiving field data type is 9(03)v99. But the output is
194. I am not getting the decimal value. Could anyone pls
let me know how to get this done?
Answer Posted / kiro
When COBOL does a divide it uses the format of the item
which in this case is integer only that is why the
fractional part is missing. You need to move the value
19446 to a 9(5)v99 item first and then do the divide using
the 9(5)v99 item.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Difference between cobol and cobol-ii?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
Are you comfortable in cobol or jcl?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
Mention the guidelines to write a structured cobol program?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
What are the different rules for performing sort operation?
example for sub strings ? and refernce modifications whit output pls
Which is not true about evaluate statement
Can we redefine the field of x(200) to less than 200?
how do you reference the esds vsam file formats from cobol programs
Can we change the password using ALTER? anyone tried and changed?
What is amode(31)
What rules are followed by the search verb.
What is a report item?