WORKING-STORAGE SECTION.
01 VAR1 COMP-2 VALUE 0.
PROCEDURE DIVISION.
MOVE 10.2115 TO VAR1.
DISPLAY 'VAR1 =' VAR1.
GOBACK.
10.2115 is stored as .10211499999999996E 02 in OS VS Cobol
10.2115 is stored as .10211500000000000E 02 in ecobol.
Any reason why?
Answer Posted / mani
comp-1 and comp-2 values can not be handled as above.
they are meant to be used for simple incrementation and i
think we can not move values like the above.
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Which division and paragraphs are mandatory for a COBOL program?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
how do you reference the printer file formats from cobol programs
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
Have you used comp and comp-3 in your project? And how?
What is inspect in cobol ?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
What are the access modes of START statement?
How do u write test cases?
Explain the configuration section of a cobol program with examples of syntax.
How do we get current date from system with century in COBOL?
how do you reference the variable unblock file formats from cobol programs
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
How to know whether the module is dynamical or statistical?