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
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
Can we redefine the field of x(200) to less than 200?
What are different data types in cobol?
Difference between cobol and cobol-ii?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
What is perform what is varying?
how to move the records from file to array table. give with code example
what is difference between cobol and cobol/400
What is the problem of ordered sequential files access?
What is the LINKAGE SECTION used in COBOL?
how to convert the recors form vsam file to db2 table tru file aid
Write a cobol program making use of the redefine clause.
how can i see junk values in dclgen or in hostvariable of comp ?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
Difference between array and sub-script ?