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 kind of error is trapped by on size error option?

730


What is the difference between a binary search and a sequential search what are the pertinent cobol?

723


What is the difference between structured cobol programming and object alternativelyiented cobol?

746


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

646


What is amode(31)

712






1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

5353


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3706


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

1915


What are the various section in data division and briefly explain them.

682


i want a program using by if, evaluate , string, unstring, perform, occurs?

4033


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

666


What is the default value(s) for an initialize and what keyword allows for an override of the default?

682


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

1639


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

846


How do define dynamic array in cobol.

660