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

What do you understand by psb and acb?

665


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

818


What are the access modes of START statement?

719


What is the local-storage section?

681


What is the utilization of copybook in cobol?

657






System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

1588


Difference between cobol and cobol-ii?

704


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

1883


Write down the divisions of cobol program?

671


Explain the configuration section of a cobol program with examples of syntax.

659


how do you reference the variable unblock file formats from cobol programs

748


Can you please let me know the centre name of INS certification in Kolkata.

1715


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1614


Name some of the examples of COBOl 11?

2686


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

748