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
What kind of error is trapped by on size error option?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
What is the difference between structured cobol programming and object alternativelyiented cobol?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
What is amode(31)
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?
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.
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...)
What are the various section in data division and briefly explain them.
i want a program using by if, evaluate , string, unstring, perform, occurs?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
How do define dynamic array in cobol.