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 Help Members By Posting Answers For Below Questions

explain sorting techniques in cobol program?

874


How do get the result of your program directly on your pc?

2056


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)?

836


Difference between cobol and cobol-ii?

926


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2108






What is report-item in COBOL?

882


What is the difference between binary search and sequential search?

841


how do you reference the ksds vsam file formats from cobol programs

866


A table has two indexes defined. Which one will be used by the SEARCH?

1001


how can i see junk values in dclgen or in hostvariable of comp ?

2741


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1874


Can we redefine the field of x(200) to less than 200?

1079


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

6072


) How do u handle errors in BMS macro

1690


What are the rules of the move verb?

929