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 / jennifer victor

comp-2 is pre defined that it stores all the data values in hexadecimal format, using 8 bytes, hence its displayed in hexa format.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What guidelines should be followed to write a structured cobol prgm?

668


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

639


) How do u handle errors in BMS macro

1505


How arrays can be defined in COBOL?

661


Write a program to explain size error.

669






What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

670


What is the local-storage section?

681


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2052


How to know whether the module is dynamical or statistical?

650


How do define dynamic array in cobol.

669


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

818


How to print 10 to 1 if the input have only 10 digit number?

808


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

680


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2093


What is rmode(24)

676